Conversation
Signed-off-by: dada-yan <BinjunYann@gmail.com>
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.
Problem
A WebDAV file named
A&B.txtcan be silently skipped during synchronization. A valid PROPFIND response represents its path as/docs/A&B.txt. quick-xml emits text, a reference, and more text separately, but the parser overwriteshrefon every text event and ignores references. The resulting path is onlyB.txt; the subsequent GET targets/B.txtand a 404 is treated as an unreadable file.Change
Accumulate text, character/entity references, and CDATA until the field closes, then interpret href, content length, and last-modified values. Percent decoding runs after the full href is assembled. Whitespace is trimmed at field boundaries rather than between XML fragments. Unknown properties remain ignored; no new dependency or API/schema change.
Reproduction and validation
Base:
816d4a39255b68849d9eecaf273ec32b3f7d793d(dev).&, decimal/hex character references, CDATA, and mixed text/CDATA. On baseline the href isB.txtinstead of/docs/A&B.txt.fetchagainst a local HTTP fixture: the original implementation returns zero files; the fixed implementation downloads the expected file and retains its filename, bytes, and external key.cargo +1.98.1 test -p utopia-server --locked webdav::tests:: -- --skip it_reads_from_a_real_webdav_servercargo fmt --all --checkandcargo clippy --workspace --all-targets --locked -- -D warnings: passed.git diff --check: passed.The optional externally configured WebDAV server test was explicitly excluded; the local HTTP integration test did run. No existing deployment, credentials, or database were used. Full workspace runtime tests were not repeated for this patch.