From 4f019a97c0674bd2dc64afe58d44d480a7c10486 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 14 Apr 2025 01:44:44 +0100 Subject: [PATCH] proxy: don't pass content-length header fixes #7 --- src/core/Handler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/Handler.cpp b/src/core/Handler.cpp index dc8f633..a8dc1ed 100644 --- a/src/core/Handler.cpp +++ b/src/core/Handler.cpp @@ -317,7 +317,8 @@ void CServerHandler::proxyPass(const Pistache::Http::Request& req, Pistache::Htt const auto HEADERS = req.headers().list(); for (auto& h : HEADERS) { // FIXME: why does this break e.g. gitea if we include it? - if (std::string_view{h->name()} == "Cache-Control" || std::string_view{h->name()} == "Connection") { + const auto HNAME = std::string_view{h->name()}; + if (HNAME == "Cache-Control" || HNAME == "Connection" || HNAME == "Content-Length") { Debug::log(TRACE, "Header in: {}: {} (DROPPED)", h->name(), req.headers().getRaw(h->name()).value()); continue; }