mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
* Reseed.cpp : check response code
This commit is contained in:
@@ -417,6 +417,10 @@ namespace data
|
|||||||
LogPrint(eLogWarning, "Reseed: incomplete/broken response from ", url.host);
|
LogPrint(eLogWarning, "Reseed: incomplete/broken response from ", url.host);
|
||||||
return "";
|
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 */
|
data.erase(0, len); /* drop http headers from response */
|
||||||
LogPrint(eLogDebug, "Reseed: got ", data.length(), " bytes of data from ", url.host);
|
LogPrint(eLogDebug, "Reseed: got ", data.length(), " bytes of data from ", url.host);
|
||||||
if (res.is_chunked()) {
|
if (res.is_chunked()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user