W3C home > Mailing lists > Public > w3c-dist-auth@w3.org > July to September 2005

If-Match header question

From: Wilfredo Sánchez Vega <wsanchez@wsanchez.net>
Date: Thu, 18 Aug 2005 09:14:38 -0700
To: Webdav WG <w3c-dist-auth@w3c.org>
Message-Id: <DE99579A-03F6-4F9E-8FCC-F93082B4F2E3@wsanchez.net>
   RFC 2068 12.25 says that for the If-Match header, one should  
respond with 412 (precondition failed) if the header doesn't match up  
with the ETag of the resource.  OK, cool.

   However, it goes on to say that if, without the If-Match header,  
the request would have resulted in a 200-series response, that the  
header must be ignored.

   This is a little tricky.  For example, if a PUT request would  
error out due to a filesystem permissions issue, the only way for me  
to find that out is to attempt to write the file.  If that works, I'd  
then have to back out the change and respond with a 412.  That seems  
like a lot of extra work there.

   There are many less expensive to detect error cases, such as  
forbidden do the auth config, etc., which presumably is what this  
line is chasing after, but even these cases seems like a lot of  
code.  Without that requirement, I can do an If-Modified test on all  
resources for all requests right away and respond with a 412 if  
appropriate.  This language seems to imply that I instead have to put  
logic into each method which attempts the request and responds with  
412 instead of a success code after potentially backing out the  

   Am I reading that wrong?


Received on Thursday, 18 August 2005 16:14:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:32 UTC