Repository navigation
Keep WebDAV URL escapes intact when fetching files and folders - #1052
Merged
Merged
Conversation
Signed-off-by: dada-yan <BinjunYann@gmail.com>
WaylandYang
approved these changes
Oct 2, 2026
WaylandYang
left a comment
Contributor
There was a problem hiding this comment.
Thanks @Maya-Kid. Keeping two paths, the escaped one for the request and the decoded one for the document's identity, is the right split: %23 and %3F stay filename bytes on the wire, and ordinary files keep the keys they already have. The proxy branch decoding after parsing and re-encoding per segment is what keeps #, ? and a literal % distinct there. The 11 WebDAV tests pass here. Landing it.
Merged
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.
A WebDAV href such as
plan%23draft.txtorwhat%3Fnow.txtwas decoded before GET, turning filename characters into a URL fragment or query. Literal percent escapes could fetch a different file, and the same problem in a collection name could abort recursive synchronization.Keep escaped href paths for GET and recursive PROPFIND, separately from document identity. Ordinary existing identities retain their shape; proxy-rewritten absolute hrefs are parsed before their path segments are decoded and reserialized, so distinct
#,?, and literal%names cannot collapse to the same document key.Validation:
UTOPIA_DAV_TEST_URLand was not exercised.-D warnings, tests with PostgreSQL 16/pgvector and required DB/PDF guards, and build pass using Rust 1.98.1.