-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Proposal: http: automaticly send Content-Length header when possible #1044
Labels
http
Issues or PRs related to the http subsystem.
Comments
It breaks 20 tests, but mostly it looks like trivial stuff like:
|
Sending |
Seems reasonable to me. It would save a few bytes per response as well. |
Ok, I'll see if I can get something ready later tonight or tomorrow. |
tellnes
added a commit
to tellnes/io.js
that referenced
this issue
Mar 5, 2015
This changes the behavior for http to send send a Content-Length header instead of using chunked encoding when we know the size of the body when sending the headers. Fixes: nodejs#1044 PR-URL: nodejs#1062 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Brian White <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I propose we make http set the
Content-Length
header when the user does only callOutgoingMessage.prototype.end
and notwrite
orwriteHead
.Eg.
It is a trivial change in
lib/
, but breaks a lot of tests.The text was updated successfully, but these errors were encountered: