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

Unified Diff: libcurl_http_fetcher.cc

Issue 3106038: AU: Expose the server's HTTP response code in HttpFetcher. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: rebase and add redirect response code checks Created 10 years, 4 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 | « http_fetcher_unittest.cc ('k') | mock_http_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libcurl_http_fetcher.cc
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index a07a8256b428dd31e4ec89a2888b7fa4d7784c0d..9989ba266bde273075359f2fd529fe4b11493be6 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -78,6 +78,7 @@ void LibcurlHttpFetcher::BeginTransfer(const std::string& url) {
bytes_downloaded_ = 0;
resume_offset_ = 0;
retry_count_ = 0;
+ http_response_code_ = 0;
ResumeTransfer(url);
CurlPerformOnce();
}
@@ -105,6 +106,7 @@ void LibcurlHttpFetcher::CurlPerformOnce() {
} else {
LOG(ERROR) << "Unable to get http response code.";
}
+ http_response_code_ = static_cast<int>(http_response_code);
// we're done!
CleanUp();
« no previous file with comments | « http_fetcher_unittest.cc ('k') | mock_http_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698