mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-21 13:16:57 +00:00
BUG/MEDIUM: http: Use pointer to the begining of input to parse message headers
In the legacy HTTP, when the message headers are parsed, in http_msg_analyzer(), we must use the begining of input and not the head of the buffer. Most of time, it will be the same pointers because there is no outgoing data when a new message is received. But when a 1xx informational response is parsed, it is forwarded and the parsing restarts immediatly. In this case, we have outgoing data when the next response is parsed. This patch must be backported to 1.9.
This commit is contained in:
parent
7a3367cca0
commit
132f7b496c
@ -832,7 +832,7 @@ void http_msg_analyzer(struct http_msg *msg, struct hdr_idx *idx)
|
||||
enum h1_state state; /* updated only when leaving the FSM */
|
||||
register const char *ptr, *end; /* request pointers, to avoid dereferences */
|
||||
struct buffer *buf = &msg->chn->buf;
|
||||
char *input = b_head(buf);
|
||||
char *input = ci_head(msg->chn);
|
||||
|
||||
state = msg->msg_state;
|
||||
ptr = input + msg->next;
|
||||
|
Loading…
Reference in New Issue
Block a user