We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
HEAD requests to folders return HTTP 405 Method Not Allowed.
I believe this is an issue because, according to RFC 4918§9.4, HEAD should be valid also on collections.
The current behaviour makes it impossible to use this extension with some WebDAV clients/libraries (e.g., java's Sardine).
# Caddyfile :8080 log root * /var/www route { webdav }
# Content of the webroot $ ls -lah /var/www total 12K drwxr-xr-x 3 root root 4.0K Jan 02 15:04 . drwxr-xr-x 14 root root 4.0K Jan 02 15:04 .. -rw-r--r-- 1 root root 11 Jan 02 15:04 a-file drwxr-xr-x 2 root root 4.0K Jan 02 15:04 a-folder
GET requests work for both file and folder:
$ curl -X GET http://localhost:8080/a-file I'm a file $ curl -X GET http://localhost:8080/a-folder <?xml version="1.0" encoding="UTF-8"?><D:multistatus xmlns:D="DAV:"><D:response><D:href>/a-folder/</D:href><D:propstat><D:prop><D:getlastmodified>Mon, 02 Jan 2006 15:04:05 MST</D:getlastmodified><D:resourcetype><D:collection xmlns:D="DAV:"/></D:resourcetype><D:displayname>a-folder</D:displayname><D:supportedlock><D:lockentry xmlns:D="DAV:"><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/></D:locktype></D:lockentry></D:supportedlock></D:prop><D:status>HTTP/1.1 200 OK</D:status></D:propstat></D:response></D:multistatus>
HEAD requests to a-file work, but to a-folder fail:
a-file
a-folder
$ curl --head http://localhost:8080/a-file HTTP/1.1 200 OK [...] $ curl --head http://localhost:8080/a-folder HTTP/1.1 405 Method Not Allowed Server: Caddy Date: Mon, 02 Jan 2006 15:04:05 MST
Note: This would close #19, where the workarounds proposed so far don't work.
The text was updated successfully, but these errors were encountered:
Huh; okay, yeah, the offending lines are probably these:
caddy-webdav/webdav.go
Lines 105 to 107 in f7b67f8
I can't remember why they are there, maybe from the previous webdav module in Caddy 1 that I ported over. 🤷♂️ Pull requests welcomed 😃
Sorry, something went wrong.
No branches or pull requests
HEAD requests to folders return HTTP 405 Method Not Allowed.
I believe this is an issue because, according to RFC 4918§9.4, HEAD should be valid also on collections.
The current behaviour makes it impossible to use this extension with some WebDAV clients/libraries (e.g., java's Sardine).
How to reproduce
# Caddyfile :8080 log root * /var/www route { webdav }
GET requests work for both file and folder:
HEAD requests to
a-file
work, but toa-folder
fail:Note: This would close #19, where the workarounds proposed so far don't work.
The text was updated successfully, but these errors were encountered: