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

net/http: buffer before chunking #2357

Closed
bradfitz opened this issue Oct 10, 2011 · 9 comments
Closed

net/http: buffer before chunking #2357

bradfitz opened this issue Oct 10, 2011 · 9 comments
Milestone

Comments

@bradfitz
Copy link
Contributor

ton of little Writes on a ResponseWriter...

cool in both chunked and non-chunked cases?

tests?

docs saying small writes are okay?
@bradfitz
Copy link
Contributor Author

bradfitz commented Nov 9, 2011

Comment 1:

Yeah, buffering currently happens after chunking, meaning small writes get quite bloated
by chunk headers.

@rsc
Copy link
Contributor

rsc commented Dec 9, 2011

Comment 2:

Labels changed: added priority-later, removed priority-medium.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 4:

Labels changed: added go1.1.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 5:

Labels changed: added size-l.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 6:

Labels changed: added suggested.

@bradfitz
Copy link
Contributor Author

Comment 7:

Related, and probably in the same CL:
If the total output from the Handler is less than the bufio Writer size (~4KB), but the
Handler never set a Content-Length, add the Content-Length.  And bonus: write the
headers + small content all out together, corking before & uncorking after.  I suspect
we're sending way too many packets right now for small responses.

@bradfitz
Copy link
Contributor Author

Comment 8:

Labels changed: removed priority-later, suggested.

Status changed to Started.

@bradfitz
Copy link
Contributor Author

Comment 9:

Sent out https://golang.org/cl/6964043

@bradfitz
Copy link
Contributor Author

Comment 10:

This issue was closed by revision bef4cb4.

Status changed to Fixed.

@bradfitz bradfitz self-assigned this Jan 11, 2013
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants