fix log level in debug code

This commit is contained in:
Sema Checherinda 2024-04-03 16:02:07 +02:00
parent 922a14eaf1
commit 532d80e20b

View File

@ -361,13 +361,16 @@ private:
std::istream & receiveResponse(Poco::Net::HTTPResponse & response) override std::istream & receiveResponse(Poco::Net::HTTPResponse & response) override
{ {
int originKA = Session::getKeepAliveTimeout().totalSeconds();
std::istream & result = Session::receiveResponse(response); std::istream & result = Session::receiveResponse(response);
result.exceptions(std::ios::badbit); result.exceptions(std::ios::badbit);
// that line is for temporary debug, will be removed // that line is for temporary debug, will be removed
if (response.has(Poco::Net::HTTPMessage::CONNECTION_KEEP_ALIVE)) if (response.has(Poco::Net::HTTPMessage::CONNECTION_KEEP_ALIVE))
LOG_WARNING(log, "received keep alive header: {}", LOG_INFO(log, "received keep alive header: {}, original was {}",
response.get(Poco::Net::HTTPMessage::CONNECTION_KEEP_ALIVE, Poco::Net::HTTPMessage::EMPTY)); response.get(Poco::Net::HTTPMessage::CONNECTION_KEEP_ALIVE, Poco::Net::HTTPMessage::EMPTY),
originKA);
response_stream = &result; response_stream = &result;
response_stream_completed = false; response_stream_completed = false;