diff options
author | Francis Dupont <fdupont@isc.org> | 2022-04-01 00:52:43 +0200 |
---|---|---|
committer | Tomek Mrugalski <tomek@isc.org> | 2022-04-22 13:35:05 +0200 |
commit | fa151329bff3d6e4af50a9f291b6f547f7a2b519 (patch) | |
tree | bf97981c62d78a3c63248c9d2a81a856a8f574f0 /src/lib/http/connection.cc | |
parent | [#687] Added the remote address in the json (diff) | |
download | kea-fa151329bff3d6e4af50a9f291b6f547f7a2b519.tar.xz kea-fa151329bff3d6e4af50a9f291b6f547f7a2b519.zip |
[#687] Moved the setRemote location breaking many UTs
Diffstat (limited to 'src/lib/http/connection.cc')
-rw-r--r-- | src/lib/http/connection.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/http/connection.cc b/src/lib/http/connection.cc index ba0b8f7a20..b1e57bddbe 100644 --- a/src/lib/http/connection.cc +++ b/src/lib/http/connection.cc @@ -401,13 +401,11 @@ HttpConnection::socketReadCallback(HttpConnection::TransactionPtr transaction, // Receiving is in progress, so push back the timeout. setupRequestTimer(transaction); - const std::string& remote = getRemoteEndpointAddressAsText(); - if (length != 0) { LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA, HTTP_DATA_RECEIVED) .arg(length) - .arg(remote); + .arg(getRemoteEndpointAddressAsText()); transaction->getParser()->postBuffer(static_cast<void*>(transaction->getInputBufData()), length); @@ -422,7 +420,6 @@ HttpConnection::socketReadCallback(HttpConnection::TransactionPtr transaction, } else { try { // The whole message has been received, so let's finalize it. - transaction->getRequest()->setRemote(remote); transaction->getRequest()->finalize(); LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_BASIC, @@ -431,18 +428,18 @@ HttpConnection::socketReadCallback(HttpConnection::TransactionPtr transaction, LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_BASIC_DATA, HTTP_CLIENT_REQUEST_RECEIVED_DETAILS) - .arg(remote) + .arg(getRemoteEndpointAddressAsText()) .arg(transaction->getParser()->getBufferAsString(MAX_LOGGED_MESSAGE_SIZE)); } catch (const std::exception& ex) { LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_BASIC, HTTP_BAD_CLIENT_REQUEST_RECEIVED) - .arg(remote) + .arg(getRemoteEndpointAddressAsText()) .arg(ex.what()); LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_BASIC_DATA, HTTP_BAD_CLIENT_REQUEST_RECEIVED_DETAILS) - .arg(remote) + .arg(getRemoteEndpointAddressAsText()) .arg(transaction->getParser()->getBufferAsString(MAX_LOGGED_MESSAGE_SIZE)); } @@ -455,7 +452,7 @@ HttpConnection::socketReadCallback(HttpConnection::TransactionPtr transaction, LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_BASIC, HTTP_SERVER_RESPONSE_SEND) .arg(response->toBriefString()) - .arg(remote); + .arg(getRemoteEndpointAddressAsText()); LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_BASIC_DATA, HTTP_SERVER_RESPONSE_SEND_DETAILS) |