Skip to content

Fix request headers for multipart#3042

Merged
DrJosh9000 merged 1 commit intomainfrom
fix-s3-multipart-headers
Oct 17, 2024
Merged

Fix request headers for multipart#3042
DrJosh9000 merged 1 commit intomainfrom
fix-s3-multipart-headers

Conversation

@DrJosh9000
Copy link
Contributor

Description

Set headers in the request that S3 is happy with.

Content-Range isn't necessary for the request (it was a flourish I added for debugging purposes), and Transfer-Encoding is added by Go when ContentLength isn't set.

Context

Testing showed that AWS rejects Content-Range and Transfer-Encoding headers with 501 Not Implemented.

Changes

  • Remove Content-Range
  • Set req.ContentLength
  • Update the comment

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

@DrJosh9000 DrJosh9000 enabled auto-merge October 17, 2024 03:01
@DrJosh9000 DrJosh9000 merged commit 066c69c into main Oct 17, 2024
@DrJosh9000 DrJosh9000 deleted the fix-s3-multipart-headers branch October 17, 2024 03:25
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