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

> Could you explain one thing: if there are cached representations
> with different response codes for the same URI, and Vary headers
> are allowed vary by response code, couldn't it easily happen
> that more than one cached representation (though at most one per
> response code) matches the request?  And if so how should the
> cache choose among the matching response codes?

It should use the one with the most recent Date.  Note, however, that
under normal conditions there will on be one cachable response code
per resource, since the server won't mark a response as cachable
unless it wants caches to use it.

>> Server-driven negotiation occurs when the server varies the response
>> entity for a particular method*identifier*request-entity*status-code
>> combination according to the value of the request-header fields, or
>> something external to the normal request parameters above (the "*" case).
> 
> Sounds clear enough...but is it true?  What about request headers
> with "required variation", as Koen brought up (e.g. Range)?  It seems
> that Vary really has to do with a fairly small set of request headers.

Any Range request (if it is recognized) results in a 206 response code,
which caches must already deal with as distinct from 200 responses.
It is certainly my hope that things won't vary beyond a few common
request headers, but that doesn't affect its definition.

 ...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 Wednesday, 5 June 1996 23:54:49 UTC