MINOR: h1: remove the HTTP status from the H1M struct
It has nothing to do there and is not used from there anymore, let's
get rid of it.
diff --git a/include/proto/h1.h b/include/proto/h1.h
index fb040d1..51e8834 100644
--- a/include/proto/h1.h
+++ b/include/proto/h1.h
@@ -304,7 +304,6 @@
{
h1m->state = H1_MSG_RQBEFORE;
h1m->next = 0;
- h1m->status = 0;
h1m->flags = H1_MF_NONE;
h1m->curr_len = 0;
h1m->body_len = 0;
@@ -318,7 +317,6 @@
{
h1m->state = H1_MSG_RPBEFORE;
h1m->next = 0;
- h1m->status = 0;
h1m->flags = H1_MF_RESP;
h1m->curr_len = 0;
h1m->body_len = 0;
diff --git a/include/types/h1.h b/include/types/h1.h
index 26eafd3..ec8cca0 100644
--- a/include/types/h1.h
+++ b/include/types/h1.h
@@ -149,8 +149,7 @@
*/
struct h1m {
enum h1m_state state; // H1 message state (H1_MSG_*)
- /* 8 bits available here */
- uint16_t status; // HTTP status code
+ /* 24 bits available here */
uint32_t flags; // H1 message flags (H1_MF_*)
uint64_t curr_len; // content-length or last chunk length
uint64_t body_len; // total known size of the body length
diff --git a/src/h1.c b/src/h1.c
index fc0b8da..1172e05 100644
--- a/src/h1.c
+++ b/src/h1.c
@@ -859,8 +859,6 @@
}
http_set_hdr(&hdr[hdr_count++], ist(":status"), ist2(start + sl.st.c, sl.st.c_l));
}
- if (h1m)
- h1m->status = sl.st.status;
sol = ptr - start;
if (likely(*ptr == '\r'))
@@ -1032,9 +1030,9 @@
http_set_hdr(&hdr[hdr_count++], n, v);
- if (h1m->status >= 100 && h1m->status < 200)
+ if (sl.st.status >= 100 && sl.st.status < 200)
h1m->curr_len = h1m->body_len = 0;
- else if (h1m->status == 304 || h1m->status == 204) {
+ else if (sl.st.status == 304 || sl.st.status == 204) {
/* no contents, claim c-len is present and set to zero */
h1m->flags |= H1_MF_CLEN;
h1m->curr_len = h1m->body_len = 0;