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

Unified Diff: net/http/http_stream_parser.cc

Issue 2298823002: Resetting the HttpRequestInfo pointers in HttpNetworkTransaction and streams (Closed)
Patch Set: Rebased till refs/heads/master@{#425377} Created 4 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_stream_parser.h ('k') | net/http/http_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_parser.cc
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 0a65fda598a857ae35abdb7e05a87bdec5a6adae..f8e5c0f00f44866245c2a6ccb9752544e457784d 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -380,6 +380,12 @@ int HttpStreamParser::ReadResponseBody(IOBuffer* buf, int buf_len,
user_read_buf_len_ = buf_len;
io_state_ = STATE_READ_BODY;
+ // Invalidate HttpRequestInfo pointer. This is to allow the stream to be
+ // shared across multiple consumers.
+ // It is safe to reset it at this point since request_->upload_data_stream
+ // is also not needed anymore.
+ request_ = nullptr;
+
int result = DoLoop(OK);
if (result == ERR_IO_PENDING)
callback_ = callback;
« no previous file with comments | « net/http/http_stream_parser.h ('k') | net/http/http_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698