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

davix-ls omits the content-type header #121

Open
AlexandreTunstall opened this issue Jun 15, 2024 · 0 comments
Open

davix-ls omits the content-type header #121

AlexandreTunstall opened this issue Jun 15, 2024 · 0 comments

Comments

@AlexandreTunstall
Copy link

My WebDAV server is running Cyrus IMAP 3.6.1 (I think).
When I try to use davix-ls to list the contents of a WebDAV directory, I get:

(Davix::HttpRequest) Error: HTTP 415 : Server Error

Adding --header 'Content-Type: application/xml' to the command works around the issue.

Note the following sentence in section 8.3 of RFC 9110

A sender that generates a message containing content SHOULD generate a Content-Type header field in that message unless the intended media type of the enclosed representation is unknown to the sender.

I could also report to the Cyrus IMAP developers that the WebDAV server should assume application/xml when unspecified, but I think their existing handling is entirely reasonable -- it's safer not to make assumptions about content type.


Version information:

Version: 0.8.6
Runtime curl version: 8.7.1 OpenSSL/3.0.13
Compiled against curl 8.7.1

OS: NixOS 24.05.1135.9b5328b7f761 (Uakari)

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