W3C home > Mailing lists > Public > ietf-http-wg@w3.org > October to December 2012

Re: Queries re P6

From: Mark Nottingham <mnot@mnot.net>
Date: Thu, 15 Nov 2012 18:10:29 +1100
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Message-Id: <D0B04F58-823E-46EB-BC24-B47FE0619C8D@mnot.net>
To: "Adrien W. de Croy" <adrien@qbik.com>, Roy Fielding <fielding@gbiv.com>

On 12/11/2012, at 12:40 PM, Mark Nottingham <mnot@mnot.net> wrote:
> 
> 
>> I don't understand how "Not modified" can be compatible with "new selected response".
> 
> I agree; I think we can change that language (which is explanatory, and doing a bad job of it) to: "If none of the stored responses contain the same strong validator, then the response MUST NOT be used to update any stored responses."

In -latest.

> 
> 
>> in 4.2.1, 
>> 
>> "If the new response does not include any form of validator, there
>> is only one stored response, and that stored response also lacks a
>> validator, then that stored response is selected."
>> 
>> Firstly, there should be an "and" in there... e.g. it should read 
>> 
>> "If the new response does not include any form of validator, and there
>> is only one stored response which also lacks a validator, then that stored response is selected."
>> 
>> But how can a server logically reply with 304 without a validator? 
>> 
>> A server can only reply with 304 if the request was conditional. For a request to be conditional, there must be a validator supplied with the request. But in this case the stored response had no validator. So where did the validator come from?
>> 
>> Does this mean that it's compliant behaviour to make a conditional request with data that wasn't in the stored response? E.g. have a cache invent an If-Modified-Since based on something else (e.g. Date)? Presumably a cache can't invent an ETag where there was none. Also, 4.2 para 2 states the If-Modified-Since comes from Last-Modified and doesn't imply it can come from elsewhere.
>> 
>> My initial reaction is to consider a 304 without validator to be a server bug.
> 
> This text was introduced by Roy in <http://trac.tools.ietf.org/wg/httpbis/trac/changeset/1374/draft-ietf-httpbis/latest/p6-cache.xml#L1096>. Roy, what was your thinking here?

Raised as <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/406>.


>> in 4.3 may I clarify meaning of
>> 
>> "If no selected response is available, the cache can forward the presented request to the origin server in a conditional request; see Section 4.2."
>> 
>> "in a conditional request" is possibly ambiguous. To me this means the cache is entitled to make the request conditional by adding If-Modified-Since or If-None-Match etc. The request may have already been conditional (e.g. UA cache). So the purpose of the cache checking validity of something that failed selection is valid? E.g. the server gets the final say but may still choose to serve the same content (e.g. same ETag) even though it didn't match selectors?
> 
> That was unintentional; IIRC we softened some of the language from 2616 here, but didn't intend that reading.
> 
> How about:
> 
> "If no selected response is available, the cache cannot satisfy the presented request. Note that it can be forwarded to the origin server in a conditional request; see Section 4.2."
> 
> E.g., the cache might include ETags it knows about in the INM to allow the server to select from one of them.

In -latest, with slight modifications.



>> in 4.2 may I suggest some wording changes.
>> 
>> Para 2 does not indicate that it's not valid to add If-Modified-Since unless there was a Last-Modified header in the stored response.
>> 
>> E.g. instead of 
>> 
>> "When sending such a conditional request, a cache adds an If-Modified-Since header field whose value is that of the Last-Modified header field from the selected (see Section 4.3) stored response, if available."
>> 
>> maybe it should read something like
>> 
>> "If the selected stored response contains a Last-Modified header, a cache SHOULD add an If-Modified-Since header field whose value is that of the Last-Modified header field from the selected stored response."
>> 
>> Likewise Para 3 and If-None-Match. E.g instead of 
>> 
>> "Additionally, a cache can add an If-None-Match header field whose value is that of the ETag header field(s) from all responses stored for the requested URI, if present...."
>> 
>> maybe
>> 
>> "Additionally if any stored response contains an ETag header field, a cache SHOULD add an If-None-Match header whose value(s) are the ETag header field(s) from all stored responses for the requested URI."
> 
> I don't object to doing this; does anyone else?


Looking at this again, I'm not sure what making them requirements really buys us here. I'd be OK with adding some prose that says that creating IMS from values other than the LM from the origin is problematic, if that would address your concern.

Cheers,


--
Mark Nottingham   http://www.mnot.net/
Received on Thursday, 15 November 2012 07:10:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 15 November 2012 07:11:00 GMT