From: Vsevolod Stakhov Date: Sun, 31 Dec 2017 16:01:47 +0000 (+0000) Subject: [Fix] Remove hop-by-hop headers in proxy X-Git-Tag: 1.7.0~315 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a7d2ffaef760aa8d61b34a2426e7215e781ff7d4;p=rspamd.git [Fix] Remove hop-by-hop headers in proxy Issue: #1973 --- diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index 1a05d8631..75002fef8 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -1922,6 +1922,9 @@ proxy_client_finish_handler (struct rspamd_http_connection *conn, session->client_conn); session->shmem_ref = rspamd_http_message_shmem_ref (session->client_message); rspamd_http_message_remove_header (msg, "Content-Length"); + rspamd_http_message_remove_header (msg, "Transfer-Encoding"); + rspamd_http_message_remove_header (msg, "Keep-Alive"); + rspamd_http_message_remove_header (msg, "Connection"); rspamd_http_message_remove_header (msg, "Key"); proxy_open_mirror_connections (session); @@ -1941,6 +1944,9 @@ err: rspamd_http_connection_steal_msg (session->client_conn); rspamd_http_message_remove_header (msg, "Content-Length"); rspamd_http_message_remove_header (msg, "Key"); + rspamd_http_message_remove_header (msg, "Transfer-Encoding"); + rspamd_http_message_remove_header (msg, "Keep-Alive"); + rspamd_http_message_remove_header (msg, "Connection"); rspamd_http_connection_reset (session->client_conn); proxy_client_write_error (session, 404, "Backend not found");