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

Unified Diff: libcurl_http_fetcher.cc

Issue 3036005: AU: HTTP success is not just 200, but anything in the 2xx range (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: Created 10 years, 5 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') | test_http_server.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 e2f18afcb66c0c5e3f71c8ca81fe97fe67193cc4..84f09726e1e1a027f5452be9d8a1b87e8262ab2f 100644
--- a/libcurl_http_fetcher.cc
+++ b/libcurl_http_fetcher.cc
@@ -119,8 +119,10 @@ bool LibcurlHttpFetcher::CurlPerformOnce() {
return false;
} else {
if (delegate_) {
- // success is when http_response_code is 200
- delegate_->TransferComplete(this, http_response_code == 200);
+ // success is when http_response_code is 2xx
+ bool success = (http_response_code >= 200) &&
+ (http_response_code < 300);
+ delegate_->TransferComplete(this, success);
}
}
} else {
« no previous file with comments | « http_fetcher_unittest.cc ('k') | test_http_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698