Browse Source

* Reseed.cpp : check response code

pull/578/head
hagen 9 years ago
parent
commit
ea7f4447b2
  1. 4
      Reseed.cpp

4
Reseed.cpp

@ -417,6 +417,10 @@ namespace data @@ -417,6 +417,10 @@ namespace data
LogPrint(eLogWarning, "Reseed: incomplete/broken response from ", url.host);
return "";
}
if (res.code != 200) {
LogPrint(eLogError, "Reseed: failed to reseed from ", url.host, ", http code ", res.code);
return "";
}
data.erase(0, len); /* drop http headers from response */
LogPrint(eLogDebug, "Reseed: got ", data.length(), " bytes of data from ", url.host);
if (res.is_chunked()) {

Loading…
Cancel
Save