Skip to content

Commit

Permalink
Merge pull request #462 from brave/brave-stats-http-success
Browse files Browse the repository at this point in the history
Fix stats updater to accept any 2XX HTTP response codes as success
  • Loading branch information
emerick authored Sep 17, 2018
2 parents f8f334c + 71d4a46 commit 764a32a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion browser/brave_stats_updater.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ void BraveStatsUpdater::OnSimpleLoaderComplete(
simple_url_loader_->ResponseInfo()->headers)
response_code =
simple_url_loader_->ResponseInfo()->headers->response_code();
if (simple_url_loader_->NetError() != net::OK || response_code != 200) {
if (simple_url_loader_->NetError() != net::OK || response_code < 200 ||
response_code > 299) {
LOG(ERROR) << "Failed to send usage stats to update server"
<< ", error: " << simple_url_loader_->NetError()
<< ", response code: " << response_code
Expand Down

0 comments on commit 764a32a

Please sign in to comment.