]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h1: add a message flag to indicate that a message carries a response
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Sep 2018 14:47:23 +0000 (16:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Sep 2018 15:38:25 +0000 (17:38 +0200)
This flag is H1_MF_RESP. It will be used by the parser during restarts when
it supports requests.

include/proto/h1.h
include/types/h1.h

index 365d06999dcfeea3e10333bc9d72c7b6a5bb9c7f..b6c61352e47a0960ab3e88bdf750b0dc6239050f 100644 (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;
index e410d9d0eec9fc922d6fdd4ffe4fbc2e4c29d27d..81ea3da9f9156cdb7c61707d7a386f6d6171237a 100644 (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 */