Re: Rigorously defining the interaction of conditional headers

>This is certainly clear and simple.  But, why do precondition checks 
>take precedence over validation checks?  While we are on the subject,
>what is the purpose of the precondition checks?

A precondition gives a client the opportunity to require that the
resource (or at least some aspect of the resource) has not changed
before applying a method.  Preconditions are necessary to support
atomic check+set actions which are common in distributed authoring
and version control situations.

Actually, validation checks are also preconditions, but I didn't have a
convenient word for preconditions-that-return-412-when-false vs
                    preconditions-that-return-304-when-false.
The latter is only used for cache validation checks.

The precedence is due to the requirement that 304 be returned only
if the response would otherwise be 200.  Since a 412 is not a 200,
those preconditions win.  Checking them first is a performance issue,
but also simplifies the algorithm description.

....Roy

Received on Thursday, 5 March 1998 22:46:48 UTC