Loading src/http/HttpProxyServer.cpp +0 −7 Changes for src/http/HttpProxyServer.cpp: 0 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -443,7 +443,6 @@ void HttpProxyController::RequestEvent(libhttppp::HttpRequest &curreq, const int } outreq.setHeaderData("x-forwarded-proto")->push_back(_tlsActive ? "https" : "http"); std::cerr << "[DIAG] dispatching method=" << method << std::endl; std::vector<char> body; if (method == "POST" || method == "PUT" || method == "PATCH") { outreq.setRequestType(method == "POST" ? POSTREQUEST Loading @@ -466,13 +465,10 @@ void HttpProxyController::RequestEvent(libhttppp::HttpRequest &curreq, const int outreq.setRequestType(GETREQUEST); body = client.Get(outreq); } std::cerr << "[DIAG] client call returned, body.size()=" << body.size() << std::endl; libhttppp::HttpResponse curres; int status = 200; if (auto *last = client.lastResponse()) { std::cerr << "[DIAG] upstream version=" << last->getVersion() << " contentType=[" << last->getContentType() << "]" << std::endl; status = last->getStatusCode(); // HttpResponse::parseH2/parseH3 clear the reason phrase entirely (H2/H3 // responses only carry a numeric ":status" pseudo-header) -- setState() Loading Loading @@ -511,15 +507,12 @@ void HttpProxyController::RequestEvent(libhttppp::HttpRequest &curreq, const int } else { curres.setState(HTTP200); } std::cerr << "[DIAG] about to curres.send(), status=" << status << std::endl; curres.send(curreq, body, static_cast<int>(body.size())); std::cerr << "[DIAG] curres.send() returned" << std::endl; // A pooled backend answering with a real HTTP response (even a 4xx/5xx from the // application itself) counts as "up" -- only a transport-level failure (caught // below) or a 5xx from the backend counts against it for passive health. upstreamOk = status < 500; } catch (const std::exception &e) { std::cerr << "[DIAG] caught exception: " << e.what() << std::endl; sendError(curreq, HTTP502, std::string("upstream error: ") + e.what()); } Loading Loading
src/http/HttpProxyServer.cpp +0 −7 Changes for src/http/HttpProxyServer.cpp: 0 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -443,7 +443,6 @@ void HttpProxyController::RequestEvent(libhttppp::HttpRequest &curreq, const int } outreq.setHeaderData("x-forwarded-proto")->push_back(_tlsActive ? "https" : "http"); std::cerr << "[DIAG] dispatching method=" << method << std::endl; std::vector<char> body; if (method == "POST" || method == "PUT" || method == "PATCH") { outreq.setRequestType(method == "POST" ? POSTREQUEST Loading @@ -466,13 +465,10 @@ void HttpProxyController::RequestEvent(libhttppp::HttpRequest &curreq, const int outreq.setRequestType(GETREQUEST); body = client.Get(outreq); } std::cerr << "[DIAG] client call returned, body.size()=" << body.size() << std::endl; libhttppp::HttpResponse curres; int status = 200; if (auto *last = client.lastResponse()) { std::cerr << "[DIAG] upstream version=" << last->getVersion() << " contentType=[" << last->getContentType() << "]" << std::endl; status = last->getStatusCode(); // HttpResponse::parseH2/parseH3 clear the reason phrase entirely (H2/H3 // responses only carry a numeric ":status" pseudo-header) -- setState() Loading Loading @@ -511,15 +507,12 @@ void HttpProxyController::RequestEvent(libhttppp::HttpRequest &curreq, const int } else { curres.setState(HTTP200); } std::cerr << "[DIAG] about to curres.send(), status=" << status << std::endl; curres.send(curreq, body, static_cast<int>(body.size())); std::cerr << "[DIAG] curres.send() returned" << std::endl; // A pooled backend answering with a real HTTP response (even a 4xx/5xx from the // application itself) counts as "up" -- only a transport-level failure (caught // below) or a 5xx from the backend counts against it for passive health. upstreamOk = status < 500; } catch (const std::exception &e) { std::cerr << "[DIAG] caught exception: " << e.what() << std::endl; sendError(curreq, HTTP502, std::string("upstream error: ") + e.what()); } Loading