On Wed, Jan 11, 2017 at 8:59 PM, Willy Tarreau <w...@1wt.eu> wrote:
>> [I can't speak with much confidence as this is the first time I see
>> the HAProxy code, but...]
>>
>>
>> >From what I see the main culprit for the connection close is the code:
>>
>> ~~~~ [starting with line 4225 in `proto_http.c`] ~~~~
>>     if (*location == '/' &&
>>         (req->flags & HTTP_MSGF_XFER_LEN) &&
>>         ((!(req->flags & HTTP_MSGF_TE_CHNK) && !req->body_len) ||
>> (req->msg_state == HTTP_MSG_DONE)) &&
>>         ((txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_SCL ||
>>          (txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_KAL)) {
>>         /* keep-alive possible */
>> ~~~~
>>
>>
>> Which might be rewrites just as:
>>
>> ~~~~ [starting with line 4225 in `proto_http.c`] ~~~~
>>     if (
>>        (req->flags & HTTP_MSGF_XFER_LEN) &&
>>         ((!(req->flags & HTTP_MSGF_TE_CHNK) && !req->body_len) ||
>> (req->msg_state == HTTP_MSG_DONE)) &&
>>         ((txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_SCL ||
>>          (txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_KAL)) {
>>         /* keep-alive possible */
>> ~~~~
>>
>>
>> I.e., just remove `*location == '/' &&`, and I assume not much will be
>> impacted, thus I guess no regressions should stem from this
>> correction.
>
> Absolutely. Feel free to provide a patch doing this (please check
> CONTRIBUTING for the format, the commit message and the subject line),
> tag it BUG/MINOR and I'll merge it.


No patch yet :) but I just wanted to confirm that this small change
seems to work just fine in production for the last two weeks.
(Granted I didn't make a thorough analysis of the traffic, but so far
no one complained, and the traffic isn't quite small.)

Perhaps later this week or next week I'll be back with a patch.

Ciprian.

Reply via email to