MINOR: h1: add a message flag to indicate that a message carries a response

This flag is H1_MF_RESP. It will be used by the parser during restarts when
it supports requests.
This commit is contained in:
Willy Tarreau 2018-09-11 16:47:23 +02:00
parent 7f437ff81c
commit ccaf233741
2 changed files with 3 additions and 2 deletions

View File

@ -306,7 +306,7 @@ static inline struct h1m *h1m_init_req(struct h1m *h1m)
h1m->state = H1_MSG_RQBEFORE;
h1m->next = 0;
h1m->status = 0;
h1m->flags = 0;
h1m->flags = H1_MF_NONE;
h1m->curr_len = 0;
h1m->body_len = 0;
h1m->err_pos = 0;
@ -320,7 +320,7 @@ static inline struct h1m *h1m_init_res(struct h1m *h1m)
h1m->state = H1_MSG_RPBEFORE;
h1m->next = 0;
h1m->status = 0;
h1m->flags = 0;
h1m->flags = H1_MF_RESP;
h1m->curr_len = 0;
h1m->body_len = 0;
h1m->err_pos = 0;

View File

@ -140,6 +140,7 @@ enum h1m_state {
#define H1_MF_NONE 0x00000000
#define H1_MF_CLEN 0x00000001 // content-length present
#define H1_MF_CHNK 0x00000002 // chunk present, exclusive with c-l
#define H1_MF_RESP 0x00000004 // this message is the response message
/* basic HTTP/1 message state for use in parsers */