httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rici Lake <>
Subject Re: mod_deflate setting Vary
Date Mon, 18 Apr 2005 00:45:26 GMT

On 17-Apr-05, at 5:30 PM, Roy T. Fielding wrote:

> On Apr 17, 2005, at 1:25 PM, wrote:
>> +
>> +  *) mod_deflate: Merge the Vary header, isntead of Setting it. Fixes
>> +     applications that send the Vary Header themselves, and also 
>> apply
>> +     mod_defalte as an output filter. [Paul Querna]

>> -        apr_table_setn(r->headers_out, "Vary", "Accept-Encoding");
>> +        apr_table_mergen(r->headers_out, "Vary", "Accept-Encoding");

> Is deflate setting Vary here because it is changing the
> Content-Encoding, or is this part also done for Transfer-Encoding?

It's setting the Content-Encoding, at this point based on its 
of the Accept-Encoding header. mod_deflate does not implement 
as far as I can see.

It doesn't quite get the Accept-Encoding right. It treats:

   Accept-Encoding: gzip;q=0

as accepting gzip encoding, and it treats:

   Accept-Encoding: *

as not accepting gzip encoding.

I could not find any bug reports complaining about this, so I don't 
think that fixing it is high priority. But I've put it on my tuit list 
anyway. For what that's worth.

The use of setn rather than mergen does create caching issues, although 
it happens to work with mod_negotiation (because mod_negotiation puts 
Vary: headers in err_headers_out instead of headers_out). I couldn't 
find any bug reports complaining about the caching issue either, but 
the fix is trivial.

> It should not be setting Vary for changes to the Transfer-Encoding.
> ....Roy

View raw message