BUG/MAJOR: http: fix regression introduced by commit a890d072

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.
This commit is contained in:
Willy Tarreau 2013-04-02 23:16:53 +02:00
parent 0999f7662c
commit ffb6f08bab

View 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) {