fix(foundry): URL-decode path segments in files_api #20
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_foundry!20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_fix_url_decode_paths"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
handle_files_apireadreq.uri().path()and used the raw path segment as the literal filename — never decoding percent-encoding. Callers that follow the standardurlencode(filename)convention (e.g.hero_office_server::socket_dav::put_file) ended up storing files with%20baked into the filename, and round-trip GETs failed (404).Fix decodes both context and file_path before any filesystem operation. Round-trip with spaces in the filename now works.
Related Issue
Closes #19
Changes
crates/hero_foundry_server/Cargo.toml— addpercent-encoding = "2.3"crates/hero_foundry_server/src/http/files_api.rs— decode context + file_pathTest Results
cargo check --workspace✅cargo test --workspace✅ (no failures across crates)Manual verification
/api/files/geomind/new test file.txtthenlsshows literal-spaces filename on disk