Re: Help! Accept-Encoding: gzip,

From: Duane Wessels <[email protected]>
Date: Thu, 13 Jan 2000 12:40:54 -0700

On Thu, 13 Jan 2000 nagy_l@vaxst2.tii.matav.hu wrote:

> Hi!
>
> I have squid 2.4-stable2 cache proxy, and I have some error when I'm go to
> www.excite.com and dailynews.yahoo.com.
>
> When I'm use netscape 4.04 then everything works but when I'm use MS explorer
> 4.01 or Netscape 4.5, 4.7 or any verson then the download is not successfull.
>
> I'm trace the traffic and I'm found one different in the two situation.
>
> With the explorer and the netscape 4.5, 4,6. 4,7 etc browsers :
>
> GET http://dailynews.yahoo.com/HTTP/1.0..Accept:image/gif,image/x-xbitmap,
> image/jpeg,image/pjpe*/*..Referer:http://www.yahoo.com/..Accept-Language:
> en-us..Accept-Encoding:gzip,deflate..User-Agent: Mozilla/4.0 (compatible; MSIE
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> 4.01; Windows NT;MATAV_IE_401_ENG)..Host:dailynews.yahoo.com..Proxy-Connection:
> Keep-Alive..Cookie: B=7fk0efob54sng..Pro
> ...
>
> The 'Accept-Encoding' line is missing, when I'm use netscape 4.04.
>
> The answer is the question from the cache :
>
> HTTP/1.0 200 OK..Date: Thu, 13 Jan 2000 14:59:14GMT..Cache-Control:private..
> Content-Type:text/html..Content-Encoding:gzip..X-Cache:MISS from cache1.matav.h
> ^^^^^^^^^^^^^^^^^^^^^^
> u..Age: 0..X-Cache: MISS from cache3.proxy.matav.hu..Proxy-Connection: close....
>
> And come the binary data...
>
> Why this happened ? Why send the data in gzip format the cache ?
>
> Please help me, because our users very unhappy ...
>
> My question is : How to fix this problen in the cache ???
>
> If I'm not use the cache (direct connection), the download is successfull.

This is an ugly problem. There are probably two ways to fix it.

1) Make Squid understand about different encodings. It would need
   to "unzip" the compressed data before sending a response to
   a browser that can not accept the compressed message.

2) Strip "Accept-Encoding:" headers from outgoing HTTP
   requests. This should ensure that all cached responses
   are not specially encoded

Patrick McManus <mcmanus@appliedtheory.com> has done work on Number 1.
You can find his patches at
http://proximate.appliedtheory.com/transfer-encoding/

Its probably easy to implement number 2 by removing Accept-Encoding
headers with the http_anonymizer option.

Duane W.
Received on Thu Jan 13 2000 - 12:50:59 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:50:22 MST