remove buffering of HTTP requests#2626
Merged
marten-seemann merged 2 commits intomasterfrom Jul 1, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2626 +/- ##
==========================================
+ Coverage 86.29% 86.32% +0.04%
==========================================
Files 123 123
Lines 9787 9783 -4
==========================================
Hits 8445 8445
+ Misses 1000 997 -3
+ Partials 342 341 -1
Continue to review full report at Codecov.
|
Only the http.ResponseWriter implements the http.Flusher interface. We need to make sure that writes to the Request.Body are actually sent out.
6adcf7d to
cb8f137
Compare
cb8f137 to
e3a5c31
Compare
lucas-clemente
approved these changes
Jul 1, 2020
| @@ -70,20 +68,15 @@ func (w *requestWriter) WriteRequest(str quic.Stream, req *http.Request, gzip bo | |||
| } | |||
Member
There was a problem hiding this comment.
In line 61 above I think there's a bug: io.Reader allows returning n > 0 together with io.EOF in one, so we should only break if err == io.EOF && n == 0, and also fix the CancelWrite handling.
(GH doesn't allow me to comment on a line that's not part of this commit 🙄
Member
Author
There was a problem hiding this comment.
Good catch! That's a separate bug though, I opened #2641 to track it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2620.
Only the
http.ResponseWriterimplements thehttp.Flusherinterface.We need to make sure that writes to the
Request.Bodyare actually sent out.