commit | 0a80a8dbb27532310dab1bdcf1bd92289140aa33 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Mon Nov 26 16:33:37 2012 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Mon Nov 26 16:36:00 2012 +0100 |
tree | bd6c1ed5612f9dbd37d47b910c6f57626d615dbf | |
parent | 5730c68b467945a83bcedded92f19b4dcda3d2bf [diff] |
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.