mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-12 18:16:58 +02:00
BUG/MINOR: http-ana: Reset response flags when 1xx messages are handled
Otherwise, the following final response could inherit of some of these flags. For instance, because informational responses have no body, the flag HTTP_MSGF_BODYLESS is set for 1xx messages. If it is not reset, this flag will be kept for the final response. One of visible effect of this bug concerns the HTTP compression. When the final response is preceded by an 1xx message, the compression is not performed. This was reported in github issue #229. This patch must be backported to 2.0 and 1.9. Note that the file http_ana.c does not exist for these branches, the patch must be applied on proto_htx.c instead.
This commit is contained in:
parent
78891c7e71
commit
3499f62b59
@ -1582,7 +1582,6 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
|
||||
* response which at least looks like HTTP. We have an indicator
|
||||
* of each header's length, so we can parse them quickly.
|
||||
*/
|
||||
|
||||
msg->msg_state = HTTP_MSG_BODY;
|
||||
BUG_ON(htx_get_first_type(htx) != HTX_BLK_RES_SL);
|
||||
sl = http_get_stline(htx);
|
||||
@ -1658,6 +1657,7 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
|
||||
FLT_STRM_CB(s, flt_http_reset(s, msg));
|
||||
htx->first = channel_htx_fwd_headers(rep, htx);
|
||||
msg->msg_state = HTTP_MSG_RPBEFORE;
|
||||
msg->flags = 0;
|
||||
txn->status = 0;
|
||||
s->logs.t_data = -1; /* was not a response yet */
|
||||
goto next_one;
|
||||
|
Loading…
Reference in New Issue
Block a user