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

Unified Diff: net/http/http_network_transaction.cc

Issue 9384: UploadDataStream::Reset should call FillBuf to return... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | « net/base/upload_data_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
===================================================================
--- net/http/http_network_transaction.cc (revision 4818)
+++ net/http/http_network_transaction.cc (working copy)
@@ -964,9 +964,13 @@
}
connection_.set_socket(NULL);
connection_.Reset();
+ // There are two reasons we need to clear request_headers_. 1) It contains
+ // the real request headers, but we may need to resend the CONNECT request
+ // first to recreate the SSL tunnel. 2) An empty request_headers_ causes
+ // BuildRequestHeaders to be called, which rewinds request_body_stream_ to
+ // the beginning of request_->upload_data.
+ request_headers_.clear();
request_headers_bytes_sent_ = 0;
- if (request_body_stream_.get())
- request_body_stream_->Reset();
next_state_ = STATE_INIT_CONNECTION; // Resend the request.
return true;
}
« no previous file with comments | « net/base/upload_data_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