Loading CMakeLists.txt +0 −8 Changes for CMakeLists.txt: 0 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -12,18 +12,10 @@ endif() # --- Mandated libraries (see docs/ARCHITECTURE.md) --- # libhttppp's own package config does not chain find_dependency() for its transitive deps, # so netplus/cmdplus must be resolved before it (see libhttppp/CMakeLists.txt for precedent). # Same reason ZLIB/brotli are resolved here too: libhttppp's own gzip/brotli support # (src/httpcompression.cpp, used by HttpProxyServer for response compression) links them # PUBLICly, so httppp::httppp's exported target requires these imported targets to already # exist in the consumer's scope even though proxyplus itself no longer calls zlib/brotli # directly. find_package(libnetplus REQUIRED) find_package(libcmdplus REQUIRED) find_package(libuuidp REQUIRED) find_package(libconfplus REQUIRED) find_package(ZLIB REQUIRED) find_package(PkgConfig REQUIRED) pkg_check_modules(BROTLI REQUIRED IMPORTED_TARGET libbrotlienc libbrotlidec) find_package(libhttppp REQUIRED) find_package(libsmtppp REQUIRED) find_package(paritypp REQUIRED) Loading src/http/HttpProxyServer.cpp +5 −0 Changes for src/http/HttpProxyServer.cpp: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -407,6 +407,7 @@ 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 @@ -429,6 +430,7 @@ 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; Loading Loading @@ -472,12 +474,15 @@ 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
CMakeLists.txt +0 −8 Changes for CMakeLists.txt: 0 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -12,18 +12,10 @@ endif() # --- Mandated libraries (see docs/ARCHITECTURE.md) --- # libhttppp's own package config does not chain find_dependency() for its transitive deps, # so netplus/cmdplus must be resolved before it (see libhttppp/CMakeLists.txt for precedent). # Same reason ZLIB/brotli are resolved here too: libhttppp's own gzip/brotli support # (src/httpcompression.cpp, used by HttpProxyServer for response compression) links them # PUBLICly, so httppp::httppp's exported target requires these imported targets to already # exist in the consumer's scope even though proxyplus itself no longer calls zlib/brotli # directly. find_package(libnetplus REQUIRED) find_package(libcmdplus REQUIRED) find_package(libuuidp REQUIRED) find_package(libconfplus REQUIRED) find_package(ZLIB REQUIRED) find_package(PkgConfig REQUIRED) pkg_check_modules(BROTLI REQUIRED IMPORTED_TARGET libbrotlienc libbrotlidec) find_package(libhttppp REQUIRED) find_package(libsmtppp REQUIRED) find_package(paritypp REQUIRED) Loading
src/http/HttpProxyServer.cpp +5 −0 Changes for src/http/HttpProxyServer.cpp: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -407,6 +407,7 @@ 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 @@ -429,6 +430,7 @@ 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; Loading Loading @@ -472,12 +474,15 @@ 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