Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROPFIND returns 400 Bad Request #46

Open
mlmorg opened this issue Nov 5, 2012 · 3 comments
Open

PROPFIND returns 400 Bad Request #46

mlmorg opened this issue Nov 5, 2012 · 3 comments

Comments

@mlmorg
Copy link

mlmorg commented Nov 5, 2012

I noticed that a PROPFIND request with no body returns a 400 Bad Request. The offending line is here:

https://github.com/chrisroberts/dav4rack/blob/master/lib/dav4rack/controller.rb#L185

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?

Thanks!

@chrisroberts
Copy link
Owner

You are not. This was an oversight and will be fixed. Thanks for the report!

schmurfy added a commit to schmurfy/dav4rack that referenced this issue Nov 7, 2012
@burgalon
Copy link

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"?>
    <A:propfind xmlns:A="DAV:">
      <A:prop>
        <C:getctag xmlns:C="http://calendarserver.org/ns/"/>
        <A:sync-token/>
      </A:prop>
    </A:propfind>

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?

@chrisroberts
Copy link
Owner

Thanks for the bump. I will see about getting that pulled in from @schmurfy fork and getting a release put together shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants