Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object_store: Uploading empty file to S3 results in "411 Length Required" #4514

Closed
Turbo87 opened this issue Jul 13, 2023 · 1 comment · Fixed by #4518
Closed

object_store: Uploading empty file to S3 results in "411 Length Required" #4514

Turbo87 opened this issue Jul 13, 2023 · 1 comment · Fixed by #4518
Labels
bug object-store Object Store Interface

Comments

@Turbo87
Copy link
Contributor

Turbo87 commented Jul 13, 2023

Describe the bug

When using the S3 implementation of object_store a put() call with an empty content fails on the server side with a "411 Length Required" error:

Generic S3 error: response error "<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>MissingContentLength</Code><Message>You must provide the Content-Length HTTP header.</Message></Error>", after 0 retries: HTTP status client error (411 Length Required) for url (https://s3.us-west-2.amazonaws.com/...)

To Reproduce

s3_store.put(&"foo".into(), Bytes::new()).await.unwrap()

Expected behavior

The call succeeds and uploads an empty file to S3.

Additional context

@tustvold
Copy link
Contributor

label_issue.py automatically added labels {'object-store'} from #4518

@tustvold tustvold added the object-store Object Store Interface label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug object-store Object Store Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants