Re: Content negotiation and Vary (1.3, 12, 13.5, 14.43)

>>That is not true.  Agent driven negotiation is indeed usable for
>>error responses for the exact same reason that "click here to
>>get the English version of this message" is usable in error responses.
>>The second request in agent-driven negotiation is always a GET on
>>a different resource.
> 
> I'm still uncomfortable with this idea.  I always perceived Vary: described
> attributes of a resource at a URI, not somehting that described attributes
> of a message that is returned from a request for that URI.  Subtley
> different, so here's what I mean:

Well, Vary is not agent-driven negotiation, but that doesn't matter
in this case since server-driven negotiation is also applicable.

> I request
> GET /foo HTTP/1.1
> Accept: text/dvi
> Accept-Language: fr-CA
> 
> Where the server has a 1) text/plain, fr-FR variant and a 2) text/html, en
> varaint.
> 
> Let's say the server is to busy to process the request and sends back a 503
> error.  Let's also say the server is a smart server, and has error messages
> in japanese and english.  So it sends back(?):
> HTTP/1.1 503 Busy
> Vary: Accept-Language
> 
> The error message in english.

Okay.  Note that it might also include a reference to the Japanese version
as an HTML hyperlink, or a similar Alternates header (eventually) -- both
qualify as agent-driven negotiation, although that would be unlikely for
this particular error code unless the alternate location was some other
server (imagine the possibilities -- the URI might be a URN, might point
to a server that provides basic error translations in any language, etc.).

> Do we not see a problem here?  The intermediary provxy cache now thinks this
> URI only varies by Accept-Language, when in fact it varies by
> Accept-Language and Accept.

No.  First of all, the cache is fully capable of understanding that the
503 error is not the same as a 200 OK; URI's don't vary -- response 
representations do.  Second, that particular response is not cachable
(not that it would matter anyway).

> If you think this example is contrivied, I'm sure there are others.  Imagine
> the same scenario with a None Acceptable message.  The server-sife entity
> chosen is obviosuly very dependent on the Accept-* haders, not just the
> Accept-Language header that the error response varies on.  A proxy could be
> seriously mislead here.

Like I said before, the protocol does not require the server to negotiate
all responses -- it will only be used if it seems to be useful.

 ...Roy T. Fielding
    Department of Information & Computer Science    (fielding@ics.uci.edu)
    University of California, Irvine, CA 92717-3425    fax:+1(714)824-4056
    http://www.ics.uci.edu/~fielding/

Received on Tuesday, 4 June 1996 10:34:57 UTC