strip Content-Length header to prevent duplicate
This commit is contained in:
@@ -447,7 +447,7 @@ void CServerHandler::proxyPassInternal(const Pistache::Http::Request& req, Pista
|
|||||||
const auto HEADERSRESP = resp.headers().list();
|
const auto HEADERSRESP = resp.headers().list();
|
||||||
|
|
||||||
for (auto& h : HEADERSRESP) {
|
for (auto& h : HEADERSRESP) {
|
||||||
if (std::string_view{h->name()} == "Transfer-Encoding") {
|
if (std::string_view{h->name()} == "Transfer-Encoding" || std::string_view{h->name()} == "Content-Length") {
|
||||||
Debug::log(TRACE, "Header out: {}: {} (DROPPED)", h->name(), resp.headers().getRaw(h->name()).value());
|
Debug::log(TRACE, "Header out: {}: {} (DROPPED)", h->name(), resp.headers().getRaw(h->name()).value());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -483,4 +483,4 @@ void CServerHandler::proxyPassInternal(const Pistache::Http::Request& req, Pista
|
|||||||
b.wait_for(std::chrono::seconds(g_pConfig->m_config.proxy_timeout_sec));
|
b.wait_for(std::chrono::seconds(g_pConfig->m_config.proxy_timeout_sec));
|
||||||
|
|
||||||
client.shutdown();
|
client.shutdown();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user