Loading src/http/HttpProxyServer.cpp +12 −0 Changes for src/http/HttpProxyServer.cpp: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -386,6 +386,18 @@ void HttpProxyController::RequestEvent(libhttppp::HttpRequest &curreq, const int std::string forwardPath = detail::buildForwardTarget( url, curreq.getRequest(), matched.pathPrefix); // WebSocket upgrades can't go through the normal HttpClient-based // request/response cycle below -- they need the connection held // open and spliced raw to the upstream, potentially for hours. See // WebSocketProxy.h for why this always speaks H1.1 to the upstream // regardless of what protocol curreq itself arrived over. if (method == "GET" && isWebSocketUpgrade(curreq)) { bool ok = handleWebSocketUpgrade(curreq, sourceIp, upstreamBase, forwardPath, trustPolicyFor(matched)); if (!pickedTarget.empty()) _loadBalancer.release(matched.upstreamPool, pickedTarget, ok); return; } bool upstreamOk = false; try { libhttppp::HttpUrl upstream(upstreamBase + forwardPath); Loading Loading
src/http/HttpProxyServer.cpp +12 −0 Changes for src/http/HttpProxyServer.cpp: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -386,6 +386,18 @@ void HttpProxyController::RequestEvent(libhttppp::HttpRequest &curreq, const int std::string forwardPath = detail::buildForwardTarget( url, curreq.getRequest(), matched.pathPrefix); // WebSocket upgrades can't go through the normal HttpClient-based // request/response cycle below -- they need the connection held // open and spliced raw to the upstream, potentially for hours. See // WebSocketProxy.h for why this always speaks H1.1 to the upstream // regardless of what protocol curreq itself arrived over. if (method == "GET" && isWebSocketUpgrade(curreq)) { bool ok = handleWebSocketUpgrade(curreq, sourceIp, upstreamBase, forwardPath, trustPolicyFor(matched)); if (!pickedTarget.empty()) _loadBalancer.release(matched.upstreamPool, pickedTarget, ok); return; } bool upstreamOk = false; try { libhttppp::HttpUrl upstream(upstreamBase + forwardPath); Loading