]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: http: properly retrieve the front connection
authorWilly Tarreau <w@1wt.eu>
Tue, 21 Apr 2015 16:15:13 +0000 (18:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Apr 2015 16:15:13 +0000 (18:15 +0200)
Commit 350f487 ("CLEANUP: session: simplify references to chn_{prod,cons}(&s->{req,res})")
introduced a regression causing the cli_conn to be picked from the server
side instead of the client side, so the XFF header is not appended anymore
since the connection is NULL.

Thanks to Reinis Rozitis for reporting this bug. No backport is needed
as it's 1.6-specific.

src/proto_http.c

index 377160b4bafc6d8d2425935579c2f91fd341b4ba..d20225a921325f13f32b7292470b5a8f405f8967 100644 (file)
@@ -4343,7 +4343,7 @@ int http_process_request(struct stream *s, struct channel *req, int an_bit)
        struct session *sess = s->sess;
        struct http_txn *txn = s->txn;
        struct http_msg *msg = &txn->req;
-       struct connection *cli_conn = objt_conn(s->si[1].end);
+       struct connection *cli_conn = objt_conn(strm_sess(s)->origin);
 
        if (unlikely(msg->msg_state < HTTP_MSG_BODY)) {
                /* we need more data */