diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-12-31 16:01:47 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-12-31 16:02:41 +0000 |
commit | a7d2ffaef760aa8d61b34a2426e7215e781ff7d4 (patch) | |
tree | f706c315684f9270520757d8bebd84cc1632fba5 /src/rspamd_proxy.c | |
parent | 9de87c61124ff0a697420319548464067c71ec75 (diff) | |
download | rspamd-a7d2ffaef760aa8d61b34a2426e7215e781ff7d4.tar.gz rspamd-a7d2ffaef760aa8d61b34a2426e7215e781ff7d4.zip |
[Fix] Remove hop-by-hop headers in proxy
Issue: #1973
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r-- | src/rspamd_proxy.c | 6 |
1 files changed, 6 insertions, 0 deletions
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"); |