httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: [users@httpd] Content negotiation and the Vary header
Date Tue, 11 Mar 2008 11:00:41 GMT
On Tue, 11 Mar 2008 06:28:00 +0100
Daniel Aleksandersen <> wrote:

> Hi list,
> Just a quick question regarding the HTTP/1.1 Vary header and content 
> negotiation. Must the Vary header contain all “content variables”

What's a "content variable"?  Vary lists request headers.

> that affects the content negotiation?
> For example, say that I have a resource at /location which a user
> requsts in Norwegian Bokmål and html. The user would
> get /location.html.nb acompanied by a Vary header containing
> «negotiation accept-language accept-type». But is the last bit really
> nessesary for a resource that is only available in one format?

There's no "accept-type".  I suggest you read the RFC rather than
make wild guesses.

But anyway, when URL /foo is resolved to file $path/foo.html.nb ,
mod_negotiation assumes there could be other negotiated options
for either or both of .html and .nb, and uses Vary to tell the
client.  It may not always be necessary, but it's safe.
Even if there's nothing there now, the fact you're using content 
negotiation suggests there might be at other times.

Nick Kew

Application Development with Apache - the Apache Modules Book

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message