-
Notifications
You must be signed in to change notification settings - Fork 196
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
Set Content-Length header in server responses #1423
Conversation
Some ambiguity exists on whether this should be left to hyper (which will perform it) or whether we should eagerly add the |
A new generated diff is ready to view.
A new doc preview is ready to view. Rust Wrk benchmark report:Duration: 90 sec, Connections: 32, Threads: 2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Linking your findings here for posterity: smithy-lang/smithy#1244.
It'd be nice if we documented somewhere, perhaps in serverRenderContentLengthHeader
, all the research you did regarding when Hyper adds/removes Content-Length
in HTTP1/HTTP2.
We should contribute a PR to awslabs/smithy adding an @httpResponseTests
asserting Content-Length
header has the expected value (despite it being a SHOULD in the HTTP RFC, which you can bring up in the PR, because they are already asserting it in @httpRequestTests
for clients).
Posted an issue inquiring about this, will follow with a PR shortly after if needed |
A new generated diff is ready to view.
A new doc preview is ready to view. Rust Wrk benchmark report:Duration: 90 sec, Connections: 32, Threads: 2
|
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
Content-Length
where appropiate in server responses #1146Description
Content-Length
header to non-streaming server responsesContent-Length
checks to the existinghttpResponseTests