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

WebDAV: the body of PROPFIND requests should be content-type: application/xml #328

Open
CMB opened this issue Sep 14, 2022 · 0 comments
Open

Comments

@CMB
Copy link

CMB commented Sep 14, 2022

Describe the bug

Authpass sends PROPFIND requests with the content-type of text/plain, but it should
be sending a content type of application/xml.
Quoting from RFC 4918, section 8.2:

When XML is used for a request or response body, the Content-Type
type SHOULD be application/xml. Implementations MUST accept both
text/xml and application/xml in request and response bodies. Use of
text/xml is deprecated.

I use mod_webdav from lighttpd, and in recent versions, it is very strict. It rejects PROPFIND with text/plain as the content type.

To Reproduce
Steps to reproduce the behavior:

  1. Install lighttpd and configure mod_webdav.
  2. Go to https://your-server.example.net/dav/ (wherever your WebDAV tree is).
  3. Start Authpass. Bring up the WebDAV dialog, and supply base URL and credentials.
  4. After clicking "ok", you should get an HTTP error 415.

Expected behavior
I expected to see the root folder of my WebDAV tree.

Smartphone (please complete the following information):

  • Device: Motorola Moto G6
  • OS: Android 9

Additional context
I looked at lighttpd source code and found the cause of the HTTP 415 error: unacceptable content type.
This looks like a super easy fix. I'd try sending a patch, but I'm not that knowledgeable of Android development.

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

1 participant