Skip to content

fix(tus): fix review findings - #2362

Open
jpnurmi wants to merge 4 commits into
v1from
jpnurmi/fix/tus
Open

jpnurmi wants to merge 4 commits into
v1from
jpnurmi/fix/tus

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Fix TUS upload findings from #2196:

The WinHTTP transport connected to the first request's host and port
and reused that connection for every later request. The upload spec
allows absolute TUS upload locations, so a location on another host
sent its PATCH requests to the DSN host instead. Reconnect when the
host or port changes.

Ref: #2196 (comment)
TUS uploads were chunked only when the create response had all of
Upload-Chunk-Granularity, Upload-Min-Chunk-Size and
Upload-Max-Chunk-Size. Relay omits Upload-Max-Chunk-Size unless it is
configured, so those resumable uploads were sent in a single PATCH.
Treat each header as optional, but keep a single PATCH for a max chunk
size alone, because Relay also sends it for oneshot uploads.

Ref: #2196 (comment)
Relay rejects upload locations older than an hour with 400 Bad Request.
Uploads interrupted at shutdown resume on the next launch, so a resumed
HEAD request could fail with 400 and drop the attachment. Start a new
upload on 400, as already done for 404 and 410.

Ref: #2196 (comment)
@jpnurmi jpnurmi changed the title fix(tus): fix(tus): fix review findings Dec 1, 2026
@jpnurmi jpnurmi mentioned this pull request Dec 1, 2026
@jpnurmi
jpnurmi requested review from jjbayer and mujacica December 1, 2026 15:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants