You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Timothy Wood <tj...@omnigroup.com> on 2012/09/25 04:38:34 UTC

If-Match not supported with PROPFIND?

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


Re: If-Match not supported with PROPFIND?

Posted by Greg Stein <gs...@gmail.com>.
On Mon, Sep 24, 2012 at 10:38 PM, Timothy Wood <tj...@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

Re: If-Match not supported with PROPFIND?

Posted by Timothy Wood <tj...@omnigroup.com>.
On Sep 26, 2012, at 1:25 AM, Julian Reschke <ju...@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?

Posted by Julian Reschke <ju...@gmx.de>.
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