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 { |