Re: If-Match not supported with PROPFIND?

2012-09-26 Thread Julian Reschke

On 2012-09-25 04:38, Timothy Wood wrote:


My reading of the WebDAV spec leads me to believe that PROPFIND should support 
If-Match, but trying it and looking at the code for dav_method_propfind() I 
don't see a call to dav_validate_request(), dav_meets_conditions() or 
ap_meets_conditions().

Is my reading of the spec incorrect, or is this an oversight? I guess I'll work 
up a patch!

Thanks!


RFC 4918 defines it as a header field that applies to any method (same 
as all RFC 2616 conditional header fields).


That being said, as ETags and timestamps do not necessarily change on 
WebDAV property changes, using it with PROPFIND may be tricky. And, as 
you have seen, support is likely to be spotty.


Best regards, Julian



Re: If-Match not supported with PROPFIND?

2012-09-26 Thread Timothy Wood

On Sep 26, 2012, at 1:25 AM, Julian Reschke julian.resc...@gmx.de wrote:
 RFC 4918 defines it as a header field that applies to any method (same as all 
 RFC 2616 conditional header fields).

Right, which is why I was hoping it would work with PROPFIND.

 That being said, as ETags and timestamps do not necessarily change on WebDAV 
 property changes, using it with PROPFIND may be tricky. And, as you have 
 seen, support is likely to be spotty.

In this case, the change is adding new member being added to a collection. 
Apache does change the ETag in this case (verified in the litmus patch), so the 
If and If-Match headers should work as predicates.

-tim



Re: If-Match not supported with PROPFIND?

2012-09-26 Thread Greg Stein
On Mon, Sep 24, 2012 at 10:38 PM, Timothy Wood t...@omnigroup.com wrote:

 My reading of the WebDAV spec leads me to believe that PROPFIND should 
 support If-Match, but trying it and looking at the code for 
 dav_method_propfind() I don't see a call to dav_validate_request(), 
 dav_meets_conditions() or ap_meets_conditions().

You're right! Looks like I totally spaced on a call to
dav_validate_request() for PROPFIND.


 Is my reading of the spec incorrect, or is this an oversight? I guess I'll 
 work up a patch!

As Julian stated, that stuff really should move out of mod_dav and
into the core httpd to apply to all requests (ie. likely move all the
logic into ap_meets_conditions). But at a minimum, you should be able
to fix it for PROPFIND. Be wary, though: I suspect that you're going
to need to perform the validation in the *walker*. ie. the If- headers
would apply to all resources touched by the request (caused by the
Depth: header).

Cheers,
-g


If-Match not supported with PROPFIND?

2012-09-24 Thread Timothy Wood

My reading of the WebDAV spec leads me to believe that PROPFIND should support 
If-Match, but trying it and looking at the code for dav_method_propfind() I 
don't see a call to dav_validate_request(), dav_meets_conditions() or 
ap_meets_conditions().

Is my reading of the spec incorrect, or is this an oversight? I guess I'll work 
up a patch!

Thanks!

-tim