]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: compression: Enable compression for IE6 w/SP2, IE7 and IE8
authorFinn Arne Gangstad <finnag@gmail.com>
Mon, 29 Oct 2012 20:43:01 +0000 (21:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Oct 2012 21:03:14 +0000 (22:03 +0100)
commitcbb9a4b1284c8ec8e89e9ce0d14ae95988e92442
tree926e8c3631bd14f66b551d59c45b9a11e7412c5c
parent07115412d3b7bb4c55e4fa5a88fdcf5450cb7a2f
MINOR: compression: Enable compression for IE6 w/SP2, IE7 and IE8

Some old browsers that have a user-agent starting with "Mozilla/4" do
not support compressison correctly, so disable compression for those.

Internet explorer 6 after Windows XP service pack 2, IE 7, and IE 8,
do however support compression and still have a user agent starting
with Mozilla/4, so we try to enable compression for those.

MSIE has a user-agent on this form:
Mozilla/4.0 (compatible; MSIE <version>; ...)

98% of MSIE 6 SP2 user agents start with
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1
The remaining 2% have additional flags before "SV1".

This simplified matching looking for MSIE at exactly position 25
and SV1 at exacly position 51 gives a few false negatives, so sometimes
a compression opportunity is lost.

A test against 3 hours of traffic to around 3000 news sites worldwide
gives less than 0.007% (70ppm) missed compression opportunities.
src/proto_http.c