]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MAJOR: http: fix regression introduced by commit a890d072
authorWilly Tarreau <w@1wt.eu>
Tue, 2 Apr 2013 21:16:53 +0000 (23:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Apr 2013 21:19:30 +0000 (23:19 +0200)
This commit fixed a bug and introduced a new one at the same time.
It's a stupid typo, the index to store the context is [0], not [2].

The effect is that parsing the header can loop forever if multiple
headers are found. This issue was reported by Lukas Tribus.

src/proto_http.c

index e7d84ce9510c75557e945b563197b90866797016..311268f1be8c9aa2f819eb479627593730f3dc46 100644 (file)
@@ -8673,7 +8673,7 @@ smp_fetch_hdr(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
                /* first call */
                ctx = &static_hdr_ctx;
                ctx->idx = 0;
-               smp->ctx.a[2] = ctx;
+               smp->ctx.a[0] = ctx;
        }
 
        if (args) {