Repository navigation
fix: DAV discovery and OPTIONS behind the OpenCloud proxy (#47, #48) - #49
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two defects found while checking whether third-party CalDAV clients can use the server behind the OpenCloud proxy.
Well-known discovery in
-dav-rootmodenewHandlerreturned right after mounting the catch-all DAV handler, so/.well-known/caldavand/.well-known/carddavwere only registered in standalone mode. Behind the proxy the request fell into the generic DAV handler, which read the path as/<user>/<collection>and answered403 dav: access to another user's data is not allowed.Both routes are now registered before the catch-all, and a test builds the handler with
davRoot=true. It fails with the same403before the change.OPTIONSwithout identityThe OpenCloud proxy does not authenticate
OPTIONS, so davcloud received it with noX-Remote-Userand answered401 missing identity, even for correctly authenticated clients.internal/davanswersOPTIONSfrom a static response (compliance headers plusAllow) that reads no user and no storage, so the identity is not needed there. Every method that touches data still requires it, and a test pins thatGET,PROPFIND,REPORT,PUTandDELETEkeep returning401without identity.Closes #47
Closes #48
Verification
go vet ./...cleango test ./...green403and401respectively)