mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-08 14:27:30 +00:00
[BUG] http: body parsing must consider the start of message
When parsing body for URL parameters, we must not consider that data are available from buf->data but from buf->data + msg->som. This is not a problem right now but may become with keep-alive.
This commit is contained in:
parent
aec571c2bb
commit
7c96f678fa
@ -248,8 +248,8 @@ struct server *get_server_ph_post(struct session *s)
|
||||
const char *params = req->data + msg->sov;
|
||||
const char *p = params;
|
||||
|
||||
if (len > req->l - msg->sov)
|
||||
len = req->l - msg->sov;
|
||||
if (len > req->l - (msg->sov - msg->som))
|
||||
len = req->l - (msg->sov - msg->som);
|
||||
|
||||
if (len == 0)
|
||||
return NULL;
|
||||
|
@ -2970,7 +2970,7 @@ int http_process_request_body(struct session *s, struct buffer *req, int an_bit)
|
||||
if (msg->hdr_content_len < limit)
|
||||
limit = msg->hdr_content_len;
|
||||
|
||||
if (req->l - msg->sov >= limit) /* we have enough bytes now */
|
||||
if (req->l - (msg->sov - msg->som) >= limit) /* we have enough bytes now */
|
||||
goto http_end;
|
||||
|
||||
missing_data:
|
||||
|
Loading…
Reference in New Issue
Block a user