Re: [squid-users] Vary / Accept-Encoding / mod_gzip Redux

From: R Pickett <[email protected]>
Date: Wed, 7 May 2003 15:22:05 -0700 (PDT)

On Wed, 7 May 2003, Henrik Nordstrom wrote:

> This can only happen if the web server for another request for the
> same URL sent a gzipped reply without including a Vary header telling
> on what it decided to send the gzipped reply.

That is, I agree, how it should work. But that's not what I'm seeing.

(Sorry, some longish pastes follow.)

I have a squid instance running as an accelerator, on port 80, pointing
to my actual Apache server on port 8080 on the same machine. So, first
I go to clear the Squid cache for that URL on the host (also, confusingly,
named 'emerson'):

----
emerson@dev:~$ telnet emerson 80
Trying 192.168.168.15...
Connected to emerson.
Escape character is '^]'.
PURGE http://emerson.craigslist.org:8080/about/best/ HTTP/1.0
HTTP/1.0 200 OK
Server: squid/2.5.STABLE2
Mime-Version: 1.0
Date: Wed, 07 May 2003 22:07:16 GMT
Content-Length: 0
X-Cache: MISS from dev.craigslist.org
Proxy-Connection: close
----
I get back a 200, it had something cached, now it's purged it.  If I repeat
this exercise, I get back a 404, there was nothing in the cache.
Then:
----
emerson@dev:~$ GET  -U -H "Accept-Encoding: gzip" -d -e http://emerson.craigslist.org/about/best/
GET http://emerson.craigslist.org/about/best/
Accept-Encoding: gzip
User-Agent: lwp-request/2.01
Connection: close
Date: Wed, 07 May 2003 22:07:44 GMT
Accept-Ranges: bytes
ETag: "19039-1682a-3eb8452b"
Server: Apache/1.3.27 (Unix) mod_gzip/1.3.26.1a mod_perl/1.27
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 22080
Content-Type: text/html
Last-Modified: Tue, 06 May 2003 23:28:43 GMT
Client-Date: Wed, 07 May 2003 22:07:44 GMT
Client-Response-Num: 1
X-Cache: MISS from dev.craigslist.org
----
Sent a request with Accept-Encoding, got back gzipped content, AND the
correct Vary header.  Squid alleged a MISS, got content from the origin
server.
Finally, the same request without Accept-Encoding added in:
----
emerson@dev:~$ GET  -U -d -e http://emerson.craigslist.org/about/best/
GET http://emerson.craigslist.org/about/best/
User-Agent: lwp-request/2.01
Connection: close
Date: Wed, 07 May 2003 22:07:44 GMT
Accept-Ranges: bytes
Age: 12
ETag: "19039-1682a-3eb8452b"
Server: Apache/1.3.27 (Unix) mod_gzip/1.3.26.1a mod_perl/1.27
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 22080
Content-Type: text/html
Last-Modified: Tue, 06 May 2003 23:28:43 GMT
Client-Date: Wed, 07 May 2003 22:07:56 GMT
Client-Response-Num: 1
X-Cache: HIT from dev.craigslist.org
----
Gzipped content.  Same Vary header.  Cache hit.
So.  Squid is not, in fact, apparently handling lack of Accept-Encoding
in the way you describe.  Unless I've missed something VERY rudimentary.
Any thoughts?  Am I somehow doing something incredibly wrong and missing
it, or is squid actually not working as advertised?
--
R Pickett <emerson@craigslist.org>
craigslist.org
Received on Wed May 07 2003 - 16:22:41 MDT

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