You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by André Malo <nd...@perlig.de> on 2003/09/06 01:41:06 UTC
need an idea :)
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?
Thanks, nd
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: need an idea :)
Posted by Yoshiki Hayashi <yo...@xemacs.org>.
André Malo <nd...@perlig.de> writes:
> # 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?
Perhaps changing the varaible name to something that doesn't
look like magic varaible will help? Say, dont-vary-if-image
or tell-httpd-not-to-compress-if-this-variable-is-set? :-)
--
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: need an idea :)
Posted by Erik Abele <er...@codefaktor.de>.
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: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org