I noticed that a PROPFIND request with no body returns a 400 Bad Request. The offending line is here:
Why is this the case? It states in the RFC that "An empty PROPFIND request body MUST be treated as if it were an 'allprop' request." http://tools.ietf.org/html/rfc4918#page-36
Am I missing something here?
You are not. This was an oversight and will be fixed. Thanks for the report!
bugfix (issue #46): empty body = allprop
It seems to me that this might have a more serious impact as some iPhones are sending requests like this:
<?xml version="1.0" encoding="UTF-8"?>
and since properties remains empty in this case (see line https://github.com/chrisroberts/dav4rack/blob/master/lib/dav4rack/controller.rb#L195) thus the request is considered empty body and 400 response is returned and the client (iPhone in the case I'm experiencing) is hammering the server and user's battery is depleting
Anyone can confirm this?
How about merging @schmurfy patch?
Thanks for the bump. I will see about getting that pulled in from @schmurfy fork and getting a release put together shortly.