httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TOKI...@aol.com
Subject Re: [PATCH] mod_cache. Allow override of some vary headers
Date Wed, 17 Aug 2005 20:19:41 GMT

> In a message dated 8/17/2005 2:01:41 PM Central Daylight Time,
> Brian.Akins@turner.com writes:
>
> CacheOverrideHeader Accept-Encoding gzip
> CacheOverrideHeader User-Agent gzip
>
> This would allow all browsers that send "Accept-Encoding: gzip" and do not
> match the BrowserMatches to be mapped to the same cache object.  All the
> other variants would point to another object.  This would be very useful in
> reverse proxy caches.
>
> Only patched mod_disk_cache, but mod_mem_cache should be trivial.
> 
> This was all done in a few hours today, including testing.

What sort of testing did you do in those few hours?

If I could play devil's advocate for a moment... my concern would be that
you haven't considered certain scenarios that won't work with this patch.

Did you test a scenario whereby the COS ( Content Origin Server ) is 
actually trying to "Vary:" the content based on "User-Agent:" regardless
of the "Accept-Encoding:" value?

My concern would be that if you have to set this up using BOTH of the
following 'overrides'...

CacheOverrideHeader Accept-Encoding gzip
CacheOverrideHeader User-Agent gzip

...that there might be times when the varied 'content' for 'User-Agent'
alone gets lost in the 'overrides'.

What would happen in this scenario...

COS has sent 2 totally different responses based on whether
'User-Agent' was MSIE or NETSCAPE.
Both of those responses were compressed ( Content-Encoding: gzip )
and they should have been stored as 2 different ( compressed ) 
'variants' for the same response based on ( non-overriden ) actual
value of "User-Agent" field.

If a request now shows up and hits your overrides and "User-Agent"
is overriden by the 'gzip' environment variable then does the 
requestor get the ( right ) compressed variant?

Yours...
Kevin

Mime
View raw message