Subject: [core] Precedence of errors (4.12 Precondition Failed)

From: Carsten Bormann <[email-masked]>
Date: Thu, 6 Dec 2012 18:04:47 +0100

HTTP says about If-Match/If-None-Match:

   If the request would, without the If-Match header field, result in
   anything other than a 2xx or 412 status, then the If-Match header
   MUST be ignored.
...
   If the request would, without the If-None-Match header field, result
   in anything other than a 2xx or 304 status, then the If-None-Match
   header MUST be ignored.

So far, we have mirrored that.  But nobody seems to know why.
In constrained implementations, this may be a significant burden.

Cullen commented earlier:

> The 2nd from last paragraph suggest all other error take precedence over 4.12. This is very hard to implement in some cases. I would remove this. Many systems will want to check and reject based on pre-conditions before doing all the other things that might cause an error.

[http://www.ietf.org/mail-archive/web/core/current/msg03072.html]

So I have relaxed this into a MAY.

If the request would, without the conditional request options, result
in anything other than a 2.xx or 4.12 response code, then any
conditional request options MAY be ignored.

I'm aware that this impacts any attempt to do a fully compliant HTTP proxy.
Comments appreciated.

Grüße, Carsten