Repository navigation
Conversation
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)
Open
mujacica
approved these changes
Dec 1, 2026
This branch has not been deployed
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.
Fix TUS upload findings from #2196:
Upload-Chunk-GranularityorUpload-Min-Chunk-Sizeis present, instead of requiring all three chunk size headers. (feat!: 1.0 #2196 (comment))HEADreturns 400, which Relay returns for expired upload locations. (feat!: 1.0 #2196 (comment))