]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: http: factor out the content-type checks
authorWilly Tarreau <w@1wt.eu>
Mon, 26 Nov 2012 15:33:37 +0000 (16:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 26 Nov 2012 15:36:00 +0000 (16:36 +0100)
commit0a80a8dbb27532310dab1bdcf1bd92289140aa33
treebd6c1ed5612f9dbd37d47b910c6f57626d615dbf
parent5730c68b467945a83bcedded92f19b4dcda3d2bf
MINOR: http: factor out the content-type checks

Let's only look up the content-type header once. This involves
inverting the condition which is not dramatic.

Also, we now always check the value length before comparing it, and we
always reset the ctx.idx before looking a header up. Otherwise that
could make header lookups depend on their on-wire order. It would be
a minor issue however since at worst it would cause some responses not
to be compressed.
src/proto_http.c