Hi,

I ran into this same issue today (Debian BTS #524341).  I'm running:

  Polipo, Debian polipo 1.0.4.1-1.1
  Apache, Debian apache2-mpm-prefork 2.2.16-6+squeeze1
  Chromium, Ubuntu chromium-browser 12.0.742.112~r90304-0ubuntu0.11.04.1, and
  MSIE 6.0.2900.5512.xpsp_sp3_gdr.101209-1647

When Chromium requests a URI from Apache via Polipo, it gets
compressed content which it decompresses and handles quite nicely.
Polipo caches the compressed content, and then serves it to MSIE when
it requests the same URI.  But MSIE isn't sending Accept-Encoding at
all, so it gives me some funny errors about downloading files.
("Internet Explorer cannot download test_page.html from
www.thoughtcrime.us.")

Apache included "Vary: Accept-Encoding" in its response, so Polipo
shouldn't have sent the cached, compressed response back to MSIE.  But
that's not necessarily Polipo's fault: it does revalidate with Apache,
and does not include any Accept-Encoding request header field, so
should Apache be sending back a different ETag or something to
indicate that the content that may be returned must be uncompressed?
I'm not familiar enough with the subtleties of HTTP to know the
answer.

These are the Apache mod_deflate directives I have in effect:

  # For logging.
  DeflateFilterNote Input instream
  DeflateFilterNote Output outstream
  DeflateFilterNote Ratio ratio
  
  # these are known to be safe with MSIE 6
  AddOutputFilterByType DEFLATE text/html text/plain text/xml
  
  # everything else may cause problems with MSIE 6
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE application/x-javascript application/javascript 
application/ecmascript
  AddOutputFilterByType DEFLATE application/rss+xml

A pcap is attached: 2002:c6ca:19fb:1::6 is where Chromium is running,
2002:c6ca:19fb:806:f085:2dff:fe5f:aaed aka 192.168.50.22 is where
Polipo is running, 2002:c6ca:19fb:811::2 is where Apache is running,
and 192.168.64.6 is where MSIE is running.  Here's an overview of the
HTTP activity (modulo favicon junk):

>>> Chromium to Polipo:
GET http://www.thoughtcrime.us/test_page.html HTTP/1.1
Host: www.thoughtcrime.us
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like 
Gecko) Ubuntu/11.04 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

>>> Polipo to Apache:
GET /test_page.html HTTP/1.1
Host: www.thoughtcrime.us
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like 
Gecko) Ubuntu/11.04 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Via: 1.1 wet-blanket.thoughtcrime.us
Connection: keep-alive

<<< Apache to Polipo:
HTTP/1.1 200 OK
Date: Tue, 26 Jul 2011 04:06:54 GMT
Server: Apache/2.2.16 (Debian)
Last-Modified: Tue, 26 Jul 2011 03:57:49 GMT
ETag: "3e0a6-28-4a8f0ef678940"
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 52
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

<<< Polipo to Chromium:
HTTP/1.1 200 OK
Content-Length: 52
ETag: "3e0a6-28-4a8f0ef678940"
Date: Tue, 26 Jul 2011 04:06:54 GMT
Last-Modified: Tue, 26 Jul 2011 03:57:49 GMT
Via: 1.1 wet-blanket.thoughtcrime.us
Server: Apache/2.2.16 (Debian)
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Connection: keep-alive

>>> MSIE to Polipo:
GET http://www.thoughtcrime.us/test_page.html HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, 
application/x-shockwave-flash, */*
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: www.thoughtcrime.us
Proxy-Connection: Keep-Alive

>>> Polipo to Apache:
GET /test_page.html HTTP/1.1
Host: www.thoughtcrime.us
If-Modified-Since: Tue, 26 Jul 2011 03:57:49 GMT
If-None-Match: "3e0a6-28-4a8f0ef678940"
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, 
application/x-shockwave-flash, */*
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Via: 1.1 wet-blanket.thoughtcrime.us
Connection: keep-alive

<<< Apache to Polipo:
HTTP/1.1 304 Not Modified
Date: Tue, 26 Jul 2011 04:07:00 GMT
Server: Apache/2.2.16 (Debian)
Connection: Keep-Alive
Keep-Alive: timeout=15, max=98
ETag: "3e0a6-28-4a8f0ef678940"
Vary: Accept-Encoding

<<< Polipo to MSIE:
HTTP/1.1 200 OK
Content-Length: 52
ETag: "3e0a6-28-4a8f0ef678940"
Date: Tue, 26 Jul 2011 04:07:00 GMT
Last-Modified: Tue, 26 Jul 2011 03:57:49 GMT
Via: 1.1 wet-blanket.thoughtcrime.us
Server: Apache/2.2.16 (Debian)
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Connection: keep-alive

-- 
J.P. Larocque <jpl-debian-...@thoughtcrime.us>

Attachment: msie.pcap
Description: application/cap

Reply via email to