users@jsr311.java.net

Re: Request.evaluateConditions(Date lastModified, EntityTag)

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 21 Sep 2009 09:47:24 -0400

On Sep 21, 2009, at 5:16 AM, Sergey Beryozkin wrote:
>
> I have originally implemented Request.evaluateConditions(Date
> lastModified, EntityTag tag)
>
> by checking for If-Modified-Since and If-Match.
>
> After rereading [1], I see :
>
> "The result of a request having both an If-Match header field and
> either an If-None-Match or an If-Modified-Since header fields is
> undefined by this specification. "
>
> If-Range description refers to Last-Modified.
>
> So what incoming headers Request.evaluateConditions(Date
> lastModified, EntityTag tag) should be aware of ? Last-Modified & If-
> Range containing a tag ? Or If-Match & If-Range containing a Date ?
> Or If-Match and If-UnModified-Since ? Or If-Non-Match and If-
> Modified-Since ?
>
Doesn't sound like we can provide a definitive answer to any of those
scenarios since its undefined by the spec. Personally I'd be inclined
to err on the side of caution and reject the request if any of the
preconditions weren't met but I'm guessing there are good reasons why
that isn't required by the HTTP spec.

Marc.