On 06/09/2003, at 01:41, Andr� Malo wrote:

mod_deflate docs
(<http://httpd.apache.org/docs-2.0/mod/mod_deflate.html#recommended>) give
this example config:


# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

The problem is that a lot of people don't read carefully enough and seem to
assume that dont-vary is a magic variable, recognized by the httpd or the
like. Any idea how (where?) to clarify that misunderstanding better?

Ahh, I see. Perhaps we can pick up the 'Header append' part from the example config and further explain it in the 'Dealing with proxy servers' section below.


just a quick shot but for example:

---
The following directive and especially the test against the 'dont-vary' environment variable, taken from the example configuration above, is needed to explicitly tell the server to only append the Vary: User-Agent header when serving one of the (possibly) compressed resources and to omit it for always excluded files (in the given example configuration the GIF, JPEG and PNG files).


    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary

Be sure to include the additional test when dealing with a similar setup, otherwise the 'dont-vary' variable won't be recognized by the server and a Vary: User-Agent header will be appended to every response. As a result, any involved proxy or cache server would have to unnecessarily request and store two or more copies of the same file, depending on the client request conditions; in the mentioned example configuration the GIF, JPEG and PNG files depending on the user agent used.
---


Thanks, nd

HTH.

Cheers,
Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to