mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-17 11:06:54 +00:00
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.
This commit is contained in:
parent
9c5e22e436
commit
11da5674c3
@ -304,7 +304,6 @@ static inline struct h1m *h1m_init_req(struct h1m *h1m)
|
||||
{
|
||||
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 @@ static inline struct h1m *h1m_init_res(struct h1m *h1m)
|
||||
{
|
||||
h1m->state = H1_MSG_RPBEFORE;
|
||||
h1m->next = 0;
|
||||
h1m->status = 0;
|
||||
h1m->flags = H1_MF_RESP;
|
||||
h1m->curr_len = 0;
|
||||
h1m->body_len = 0;
|
||||
|
@ -149,8 +149,7 @@ enum h1m_state {
|
||||
*/
|
||||
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
|
||||
|
6
src/h1.c
6
src/h1.c
@ -859,8 +859,6 @@ int h1_headers_to_hdr_list(char *start, const char *stop,
|
||||
}
|
||||
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 @@ int h1_headers_to_hdr_list(char *start, const char *stop,
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user