Issue 147 - Depth vs Conditional headers

See <http://ietf.cse.ucsc.edu:8080/bugzilla/show_bug.cgi?id=147>.

Hi,

it seems that RFC2518 and RFC2518bis share a major problem in defining 
how the Depth header and other headers interact. In Section 9.2, RFC2518 
(<http://greenbytes.de/tech/webdav/rfc2518.html#rfc.section.9.2.p.9>) says:

"Any headers on a method that has a defined interaction with the Depth 
header MUST be applied to all resources in the scope of the method 
except where alternative behavior is explicitly defined. For example, an 
If-Match header will have its value applied against every resource in 
the method's scope and will cause the method to fail if the header fails 
to match."

Let's look at an example. A COPY request with Depth infinity having an 
If-Match header such as:

   COPY /foo HTTP/1.1
   Host: example.com
   Destination: http://example.com/bar
   If-Match: "123"
   Depth: Infinity

would need to evaluate the If-Match header for each resource to be 
copied. There are two major problems with this:

1) It would be extremely expensive. For a copy of a large tree, the 
server would need check entity tags on any member before even starting 
the copy operation, because it would need to fail with a top-level 412 
status otherwise.

2) It's not being implemented in today's servers, see 
<http://ietf.cse.ucsc.edu:8080/bugzilla/show_bug.cgi?id=147#c3>.


Now for the "If" header itself (this is the only applicable header 
defined in RFC2518 itself), RFC2518bis already states that it only 
applies to the Request-URI (when the untagged form is used).


The only simple fix I can currently think of for the Depth header 
definition though is to revert the definition at least for those headers 
where we know that servers aren't doing it as defined (and also are not 
likely to change their behavior). Such as replace the quoted paragraph by:

"Any headers on a method that has a defined interaction with the Depth 
header MUST be applied to all resources in the scope of the method 
except where alternative behavior is explicitly defined, and except for 
the If-Dash headers defined in RFC2616 and the If header defined in 
Section x.xy)."

Feedback appreciated (I mean it! :-),

Julian

Received on Saturday, 7 January 2006 12:28:02 UTC