summaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index d2ac90aa0..5a969a155 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -1176,6 +1176,10 @@ proxy_client_finish_handler (struct rspamd_http_connection *conn,
}
proxy_open_mirror_connections (session);
+ 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_connection_reset (session->client_conn);
session->master_conn->backend_conn = rspamd_http_connection_new (
NULL,
@@ -1195,11 +1199,6 @@ proxy_client_finish_handler (struct rspamd_http_connection *conn,
msg, NULL, NULL, session->master_conn,
session->master_conn->backend_sock,
&session->ctx->io_tv, session->ctx->ev_base);
- 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_connection_reset (session->client_conn);
-
}
}
else {