On Wed, Jan 11, 2017 at 08:53:18PM +0200, Ciprian Dorin Craciun wrote: > On Wed, Jan 11, 2017 at 8:27 PM, Lukas Tribus <lu...@gmx.net> wrote: > > But if we do remove those conditions, I guess we break a number of "old > > assumptions" > > and we will hit new code paths, so there is a potential for bugs :) > > > [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. Thanks Ciprian! Willy