On Wed, Jan 11, 2017 at 8:27 PM, Lukas Tribus <[email protected]> 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:
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4
~~~~ [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.
Ciprian.