Re: How to handle PROPFIND request with empty <prop> element?

Julian Reschke <[email protected]>
Newsgroups gmane.ietf.webdav
Message-ID <[email protected]>
Henrik Holst wrote:
> Hi,
> 
> according to RFC4918 one should treat empty PROPFIND requests like an 
> <allprop> request, but how should one handle a PROPFIND request which is 
> not empty but have an empty <prop> element like:
> 
> <?xml version="1.0" encoding="utf-8"?>
>   <propfind xmlns="DAV:">
>   <prop></prop>
> </propfind>
> 
> Should this also be treated as an <allprop> request or should we reply 
> with say "412 Precondition Failed" or some other error reply?

It's invalid, as <prop> should contain a child element specifying the 
property.

Thus, it seems that status 422 makes sense.

Note that 412 has a very specific semantic that doesn't apply here.

And yes, it's unfortunate that there's no really simple way to just get 
the children of a collection; when I needed this, I usually asked for 
DAV:resourcetype, as this is known to exist on every resource, and 
should be cheap to compute.

BR, Julian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.