httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
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 <aleksandersen+apache.org@runbox.com> 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
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message