-
Notifications
You must be signed in to change notification settings - Fork 597
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
Throw specific error if Content-Length can't be computed #3400
Comments
As of now, the contentLengthMiddleware skips setting aws-sdk-js-v3/packages/middleware-content-length/src/index.ts Lines 27 to 33 in 88f8cc2
|
From rfc7230 specification 3.3.2
|
The contentLengthMiddleware checks if body is defined and Content-Length header is not set before calling bodyLengthChecker. And as per spec it should be fine to throw error if bodyLengthChecker, as user agent should send a Content-Length in case of enclosed payload body. I've asked this question on internal Slack channel to check behaviors in other SDKs, and will revisit this feature request in future. |
The AWS SDK for Python and CLI sets |
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Is your feature request related to a problem? Please describe.
S3 throws
NotImplemented
Error in Content-Length can't be computed in #3377The error can be more specific, i.e. Content-Length can't be computed.
Describe the solution you'd like
Throw error in
calculateBodyLength
if length can't be computed.Describe alternatives you've considered
N/A
Additional context
This suggestion was discussed and approved internally.
The text was updated successfully, but these errors were encountered: