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

Unified Diff: net/http/http_network_transaction.cc

Issue 7289006: Basic HTTP pipelining support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 2 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_basic_stream.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 84df782f0970d5cb276304035e8283319f38c910..c66f0f3865b3e1f3b1cdbed86d062590c5a2aa9c 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -39,7 +39,6 @@
#include "net/http/http_proxy_client_socket_pool.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_request_info.h"
-#include "net/http/http_response_body_drainer.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
#include "net/http/http_server_properties.h"
@@ -137,15 +136,8 @@ HttpNetworkTransaction::~HttpNetworkTransaction() {
stream_->Close(true /* not reusable */);
} else {
// Otherwise, we try to drain the response body.
- // TODO(willchan): Consider moving this response body draining to the
- // stream implementation. For SPDY, there's clearly no point. For
- // HTTP, it can vary depending on whether or not we're pipelining. It's
- // stream dependent, so the different subtypes should be implementing
- // their solutions.
- HttpResponseBodyDrainer* drainer =
- new HttpResponseBodyDrainer(stream_.release());
- drainer->Start(session_);
- // |drainer| will delete itself.
+ HttpStream* stream = stream_.release();
+ stream->Drain(session_);
}
}
}
@@ -1198,12 +1190,19 @@ int HttpNetworkTransaction::HandleIOError(int error) {
case ERR_CONNECTION_CLOSED:
case ERR_CONNECTION_ABORTED:
if (ShouldResendRequest(error)) {
+ net_log_.AddEvent(
+ NetLog::TYPE_HTTP_TRANSACTION_RESTART_AFTER_ERROR,
+ make_scoped_refptr(new NetLogIntegerParameter("net_error", error)));
ResetConnectionAndRequestForResend();
error = OK;
}
break;
+ case ERR_PIPELINE_EVICTION:
case ERR_SPDY_PING_FAILED:
case ERR_SPDY_SERVER_REFUSED_STREAM:
+ net_log_.AddEvent(
+ NetLog::TYPE_HTTP_TRANSACTION_RESTART_AFTER_ERROR,
+ make_scoped_refptr(new NetLogIntegerParameter("net_error", error)));
ResetConnectionAndRequestForResend();
error = OK;
break;
« no previous file with comments | « net/http/http_basic_stream.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698