Loading src/http/HttpProxyServer.cpp +9 −0 Changes for src/http/HttpProxyServer.cpp: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -222,6 +222,15 @@ void HttpProxyController::applyResponseCompression(libhttppp::HttpRequest &curre } std::string HttpProxyController::sourceIpOf(libhttppp::HttpRequest &curreq) const { // H2/H3 requests are dispatched on a per-stream HttpRequest with no // socket of its own (one physical connection multiplexes many streams); // the dispatcher stashes the real peer address there since it's the // only object RequestEvent() sees for those protocols -- prefer it, and // fall back to the connection's own socket (the H1.1 case, which has // one HttpRequest per connection). if (!curreq.getPeerAddress().empty()) { return curreq.getPeerAddress(); } std::string addr; if (!curreq.slots.empty() && curreq.slots[0].csock) { curreq.slots[0].csock->getAddress(addr); Loading Loading
src/http/HttpProxyServer.cpp +9 −0 Changes for src/http/HttpProxyServer.cpp: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -222,6 +222,15 @@ void HttpProxyController::applyResponseCompression(libhttppp::HttpRequest &curre } std::string HttpProxyController::sourceIpOf(libhttppp::HttpRequest &curreq) const { // H2/H3 requests are dispatched on a per-stream HttpRequest with no // socket of its own (one physical connection multiplexes many streams); // the dispatcher stashes the real peer address there since it's the // only object RequestEvent() sees for those protocols -- prefer it, and // fall back to the connection's own socket (the H1.1 case, which has // one HttpRequest per connection). if (!curreq.getPeerAddress().empty()) { return curreq.getPeerAddress(); } std::string addr; if (!curreq.slots.empty() && curreq.slots[0].csock) { curreq.slots[0].csock->getAddress(addr); Loading