Subject: Re: Confusion in preconditions

From: "Eric J. Bowman" <[email-masked]>
Date: Wed, 1 Feb 2012 00:59:31 -0700

Zhong Yu wrote:
> 
> One must wonder, the problem of conditionals appears to be very easy.
> We can have a simple model and a simple procedure, that succinctly and
> precisely defines behaviors in any scenario.
> 

I've suggested changing the document order around and trimming the
wording down, this also seems like issue 241:

http://trac.tools.ietf.org/wg/httpbis/trac/ticket/241

>
> Why does the spec instead "beat around the bush", going very
> roundabout ways, only setting some constraints on some scenarios? Are
> readers supposed to solve the riddles to learn the underlying model?
> 

Nonetheless, I didn't find it all that hard to write working code, and
I'm not much of a coder.  Coming up with alternate spec language is
harder.

-Eric

---

From: Zhong Yu <[email-masked]>
Date: Wed, 1 Feb 2012 09:38:33 -0600

On Wed, Feb 1, 2012 at 1:39 AM, Amos Jeffries <[email-masked]> wrote:
> On 01.02.2012 19:11, Zhong Yu wrote:

> I am pushing to have the conditionals interpreted as a AND condition between
> all present conditionals.
>
>  if anything needs a special status response -> do that
>  if any of the conditions is invalid => 412 status
>  if ( (If-Match x) AND (If-None-Match y or z) AND (if-modified-since T) AND
> ... ) => 2xx status
>  otherwise 304 status

I don't quite understand. According to the current draft -

1) If there's a single If-Match condition and it tests false, we
should return 412.
2) If there's a single If-None-Match condition and it tests false (and
the method is GET/HEAD), we should return 304.

Your pseudo code doesn't seem to behave this way.

Zhong yu

---

From: Zhong Yu <[email-masked]>
Date: Wed, 1 Feb 2012 09:48:06 -0600

On Wed, Feb 1, 2012 at 1:59 AM, Eric J. Bowman <[email-masked]> wrote:
> I'm not much of a coder.

If the spec author or an implementer knows at least one model that
fits all the requirements, it'd be nice to show it to the public.

Zhong Yu

---

From: Amos Jeffries <[email-masked]>
Date: Thu, 02 Feb 2012 19:03:51 +1300

On 2/02/2012 4:38 a.m., Zhong Yu wrote:
> On Wed, Feb 1, 2012 at 1:39 AM, Amos Jeffries<[email-masked]>  wrote:

That would be "special status....".

> the method is GET/HEAD), we should return 304.

"otherwise ..."

---

From: Henrik Nordström <[email-masked]>
Date: Mon, 06 Feb 2012 05:25:41 +0100

ons 2012-02-01 klockan 02:35 +0000 skrev Sebastien Lambla:

> I *think* the specification does define partially a behavior when
> multiple conditional headers are present in the scenario leading to a
> 304, or am I misunderstanding the definition?

Not really. If does not define what the response should be in that case,
only that it can not be 304 unless.... 2.4 is just a safety guard
restricting the undefinedness by a forbidding response class which would
otherwise break caches.

The reason why the sencence about "undefined" is there is to point out
the headers can easily conflict and it's non-obvious to say how such
conflicts should be resolved.

Regards
Henrik