From: Willy Tarreau Date: Tue, 11 Sep 2018 14:47:23 +0000 (+0200) Subject: MINOR: h1: add a message flag to indicate that a message carries a response X-Git-Tag: v1.9-dev2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccaf2337412fc9c1552953ff9e2cc360ebb12830;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/proto/h1.h b/include/proto/h1.h index 365d06999d..b6c61352e4 100644 --- a/include/proto/h1.h +++ b/include/proto/h1.h @@ -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; diff --git a/include/types/h1.h b/include/types/h1.h index e410d9d0ee..81ea3da9f9 100644 --- a/include/types/h1.h +++ b/include/types/h1.h @@ -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 */