From ea7f4447b2c632fc27918e70debf3365933a7abf Mon Sep 17 00:00:00 2001 From: hagen Date: Tue, 19 Jul 2016 00:00:00 +0000 Subject: [PATCH] * Reseed.cpp : check response code --- Reseed.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Reseed.cpp b/Reseed.cpp index 1091ef0a..66609414 100644 --- a/Reseed.cpp +++ b/Reseed.cpp @@ -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()) {