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

Unified Diff: headless/public/util/http_url_fetcher.cc

Issue 2501553003: Fix bug in HttpURLFetcher that dropped the response headers (Closed)
Patch Set: Fix typo Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/util/http_url_fetcher.cc
diff --git a/headless/public/util/http_url_fetcher.cc b/headless/public/util/http_url_fetcher.cc
index cbb2c0ad667b4ea60035d8c2f1e3eb9811a7fa49..af5451218dd7e366c0add8348d4460dd190ed8ca 100644
--- a/headless/public/util/http_url_fetcher.cc
+++ b/headless/public/util/http_url_fetcher.cc
@@ -6,6 +6,7 @@
#include "net/base/io_buffer.h"
#include "net/cert/cert_status_flags.h"
+#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
@@ -165,9 +166,13 @@ void HttpURLFetcher::Delegate::OnResponseCompleted(net::URLRequest* request,
return;
}
- result_listener_->OnFetchCompleteExtractHeaders(
- request->url(), request->GetResponseCode(), bytes_read_so_far_.c_str(),
- bytes_read_so_far_.size());
+ // TODO(alexclarke) apart from the headers there's a lot of stuff in
+ // |request->response_info()| that we drop here. Find a way to pipe it
+ // through.
+ result_listener_->OnFetchComplete(
+ request->url(), request->GetResponseCode(),
+ request->response_info().headers,
+ bytes_read_so_far_.c_str(), bytes_read_so_far_.size());
}
HttpURLFetcher::HttpURLFetcher(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698