]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: http: use a static storage for sample fetch context
authorWilly Tarreau <w@1wt.eu>
Tue, 2 Apr 2013 10:01:06 +0000 (12:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Apr 2013 10:01:06 +0000 (12:01 +0200)
commita890d072fc11b0c0b6e20b82ff98dcf945d28232
tree0aed8be5513ac1f058ec2234249dbfdc918c5a9d
parent8624cab29c52db9052bf022683cfd3d11369cc0d
BUG/MAJOR: http: use a static storage for sample fetch context

Baptiste Assmann reported that the cook*() ACLs do not work anymore.

The reason is the way we store the hdr_ctx between subsequent calls
to smp_fetch_cookie() since commit 3740635b (1.5-dev10).

The smp->ctx.a[] storage holds up to 8 pointers. It is not meant for
generic storage. We used to store hdr_ctx in the ctx, but while it used
to just fit for smp_fetch_hdr(), it does not for smp_fetch_cookie()
since we stored it at offset 2.

The correct solution is to use this storage to store a pointer to the
current hdr_ctx struct which is statically allocated.
src/proto_http.c