AU: Expose the server's HTTP response code in HttpFetcher.
A step towards resolving 2394 -- we'll need to exponentially back
off on 500 and 503 as well as 502 if possible.
BUG=2394
TEST=unit tests, gmerged and made sure updates can happen
Change-Id: I7928e3af37f23ce1ba197315ec52ab0b2ed0dc4c
Review URL: http://codereview.chromium.org/3106038
diff --git a/libcurl_http_fetcher.cc b/libcurl_http_fetcher.cc
index a07a825..9989ba2 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -78,6 +78,7 @@
bytes_downloaded_ = 0;
resume_offset_ = 0;
retry_count_ = 0;
+ http_response_code_ = 0;
ResumeTransfer(url);
CurlPerformOnce();
}
@@ -105,6 +106,7 @@
} else {
LOG(ERROR) << "Unable to get http response code.";
}
+ http_response_code_ = static_cast<int>(http_response_code);
// we're done!
CleanUp();