W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2007

Re: If-match clarification

From: Jeffrey Mogul <Jeff.Mogul@hp.com>
Date: Thu, 21 Jun 2007 10:36:00 -0700
Message-Id: <200706211736.l5LHa0a6016600@pobox-pa.hpl.hp.com>
To: Cyrus Daboo <cyrus@daboo.name>
Cc: ietf-http-wg@w3.org

    The description of If-match describes two possible situations, but those 
    are not all that could occur:
    
    1) If all etags in If-Match match, or If-Match * is used and the entity 
    exists then normal processing occurs.
    
    2) If any etags in If-Match do not match, or If-Match * is used and the 
    entity does not exist, then 412 must be returned.
    
Actually, it says "if *none* of the etags match" ... this is
different from "if any do not match".  Probably this is what
you meant.

    But what about the case of an etag provided in If-Match against a
    resource that no longer exists? Should the server return 404 or
    412?
    
For this case, the actual language used is:

    ... if "*" is given and no current
    entity exists, the server MUST NOT perform the requested method, and
    MUST return a 412 (Precondition Failed) response.

I'm having a hard time understanding the difference between

  "no current entity exists" [for the resource identified by request-uri]

and

  the resource [identified by request-uri] no longer exists (does not exist)

Is there any practical difference between these two statements?

If not, then the meaning of the spec is pretty clear.  Whether it
is what we want is a different question; perhaps I could see returning
404 as being both more reasonable and easier to implement, but in
our current discussions, we're trying to avoid changing the spec.

(And it's not clear to me that GET and PUT should be specified
as generating different status codes in this case; that seems likely
to create complexity in the long run.)

-Jeff
Received on Thursday, 21 June 2007 17:36:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:50:10 GMT