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

Improve WebDAV compatibility #681

Merged
merged 5 commits into from
Jun 18, 2024

Conversation

grote
Copy link
Collaborator

@grote grote commented Jun 14, 2024

This MR improves compatibility with nginx and lighttpd. It resolves some issues with dufs, but that server still doesn't work for restore due to sigoden/dufs#402

Fixes #673

@grote grote requested review from stevesoltys and t-m-w June 14, 2024 12:23
Copy link
Collaborator

@t-m-w t-m-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not reviewed the code but tested the outcome. This fixes backup/restore with nginx and lighttpd while also offering some compatibility improvements for Dufs. It should broaden compatibility in general. Sounds good to me!

@grote grote merged commit fd5089d into seedvault-app:android14 Jun 18, 2024
1 of 3 checks passed
@grote grote deleted the webdav-trailing-slash branch June 18, 2024 13:55
if (code == 400) {
return true
}
// lighttpd returns 403 with <DAV:propfind-finite-depth/> error as if we used infinity

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: lighttpd does support Depth: infinity but the feature is disabled by default since it can be slow on very large directory trees on very slow disks.

Since lighttpd 1.4.56 (released Nov 2020), you can add to lighttpd.conf:
webdav.opts += ("propfind-depth-infinity" => "enable")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to know, but does it also support off-spec stuff like Depth: 2 like SabreDAV?

@t-m-w may be worth re-testing lighttpd with that option enabled.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but does it also support off-spec stuff like Depth: 2 like SabreDAV?

No, lighttpd mod_webdav does not support "off-spec" that I have not seen before. Do you have a reference to SabreDAV doc describing the behavior? (I can guess, but I'd rather not.)

From a (very, very, very quick) grep of https://github.com/sabre-io/dav, the code comments about Depth: 2 for use with CalDAV. The CalDAV spec is not currently implemented by lighttpd mod_webdav.

However, you can use lighttpd mod_webdav to serve file-backed collections, and you can have lighttpd route CalDAV url-paths back to nextcloud or owncloud sabredav-based backends.

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

Successfully merging this pull request may close these issues.

WebDAV error: DavException: Received redirect from HTTPS to HTTP
4 participants