fix(router): preserve percent-encoding in forward_path #62
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_router!62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_fix_router_percent_encoding"
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
hero_router worker threads were panicking on any URL whose path contains percent-encoded characters (e.g.
%20).service_proxy_pathderivedforward_pathfrom axum'sPath<(String, String, String)>extractor, which percent-decodes — soData%20Mining...becameData Mining...(raw spaces) and hyperlocal's URI builder rejected it withInvalidUriChar.Fix derives
forward_pathfrom the rawreq.uri().path()and strips the/<service>/<webname>/prefix, preserving encoding all the way to the upstream UDS request.Related Issue
Closes #61
Changes
crates/hero_router/src/server/routes.rs—service_proxy_pathbuilds forward_path from raw URITest Results
cargo fmt --check✅cargo check --workspace✅cargo clippy --workspace -- -D warnings✅cargo test --workspace79/79 ✅Manual verification
curl -i 'http://127.0.0.1:9988/hero_office/ui/pdf/edit/Data%20Mining%20Lab%20Two-1.pdf?context=geomind'returns 200 with the expected HTML; noInvalidUriCharpanics in router stderr.