Repository navigation
Fix write after close on http response - #10244
Merged
Merged
Conversation
Contributor
|
This PR should fix the panic but may be susceptible to leaking the |
Signed-off-by: Derek McGowan <[email protected]> (github: dmcgowan)
Signed-off-by: Stephen J Day <[email protected]>
stevvooe
force-pushed
the
registry-panic-fix
branch
from
January 21, 2015 23:14
1626277 to
7d1a145
Compare
Contributor
|
drone failed |
Member
Author
|
This panic was also trigger on a v1 registry #9913 Configured nginx in the same way but yet to get a panic |
Contributor
|
@icecrime @jfrazelle I am going to back out the FlushingWriter changes to see if that clears up the tests. |
stevvooe
force-pushed
the
registry-panic-fix
branch
from
January 22, 2015 03:29
1e13c10 to
4e4a5b2
Compare
Contributor
|
Okay, I don't see harm in this PR. Also it is probably fixes pretty bad crashes :) |
Contributor
|
Agreed: I see no harm, only potential fixes. LGTM |
icecrime
pushed a commit
that referenced
this pull request
Jan 22, 2015
Fix write after close on http response
This was referenced Jan 22, 2015
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.
Address #10228 but is not a confirmed fix
Both solutions should be valid and fix a possible panic caused by writing to an http.Response after the response has been finalized. The fix in streams could fix a wider range of panics. The registry fix is targeting a specific panic caused by a close on the progressreader being called by the network connection. The NopCloser will prevent the network connection from being able to close the progressreader, which in turns attempts a flush on a writer bound to the http.Response to the client.