service_proxy_* buffers the entire request body — switch to streaming #55
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#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
service_proxy_rootandservice_proxy_pathincrates/hero_router/src/server/routes.rscollect the whole request body withaxum::body::to_bytes(body, LIMIT)before forwarding to the backend UDS.LIMIT(currently 16 MB).LIMIT,.unwrap_or_default()swallows the error and forwards an empty body — the client seesERR_EMPTY_RESPONSEinstead of413 Payload Too Large.LIMITbytes of router memory.Repro
Against any upload endpoint behind hero_router (e.g. hero_foundry WebDAV PUT):
Fix
Replace
to_bytes+ buffered forwarding with a streaming pass-through to the backend UDS — forwardhyper::Bodystraight through without materializing it. Removes the ceiling and keeps memory bounded regardless of upload size.On genuine error, return
413 Payload Too Largeexplicitly rather than defaulting to an empty body, so the client sees a clear failure.