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

Unified Diff: net/http/http_network_transaction.cc

Issue 389007: After draining the body of a 401/407 response, verify that... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Improve comments Created 11 years, 1 month 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 | « no previous file | 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
===================================================================
--- net/http/http_network_transaction.cc (revision 31823)
+++ net/http/http_network_transaction.cc (working copy)
@@ -276,8 +276,11 @@
}
void HttpNetworkTransaction::DidDrainBodyForAuthRestart(bool keep_alive) {
- if (keep_alive) {
+ if (keep_alive && connection_.socket()->IsConnectedAndIdle()) {
+ // We should call connection_.set_idle_time(), but this doesn't occur
+ // often enough to be worth the trouble.
next_state_ = STATE_SEND_REQUEST;
+ connection_.set_is_reused(true);
reused_socket_ = true;
} else {
next_state_ = STATE_INIT_CONNECTION;
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698