Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(953)

Unified Diff: net/http/http_response_body_drainer.cc

Issue 1884943003: HttpStreamParser: Don't reuse sockets which receive unparsed data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_response_body_drainer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_body_drainer.cc
diff --git a/net/http/http_response_body_drainer.cc b/net/http/http_response_body_drainer.cc
index fdcec3115d3fc515723f977c54bf68cfd9b4f8f8..6b04f6eca376da6a9486169d85b7135bdafa3c73 100644
--- a/net/http/http_response_body_drainer.cc
+++ b/net/http/http_response_body_drainer.cc
@@ -113,7 +113,7 @@ void HttpResponseBodyDrainer::Finish(int result) {
if (session_)
session_->RemoveResponseDrainer(this);
- if (result < 0) {
+ if (result < 0 || !stream_->CanReuseConnection()) {
stream_->Close(true /* no keep-alive */);
} else {
DCHECK_EQ(OK, result);
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_response_body_drainer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698