From debd36af7a2e4af9bde4331c150fe0526596e95e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 25 Apr 2022 21:30:23 +0100 Subject: [PATCH] [Fix] Properly set `Host` in rspamd_proxy --- src/rspamd_proxy.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index aad1a49fd..e712b2cba 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -1466,7 +1466,7 @@ proxy_open_mirror_connections (struct rspamd_proxy_session *session) msg->method = HTTP_GET; rspamd_http_connection_write_message_shared (bk_conn->backend_conn, - msg, NULL, NULL, bk_conn, + msg, rspamd_upstream_name(bk_conn->up), NULL, bk_conn, bk_conn->timeout); } else { @@ -1493,7 +1493,7 @@ proxy_open_mirror_connections (struct rspamd_proxy_session *session) } rspamd_http_connection_write_message (bk_conn->backend_conn, - msg, NULL, NULL, bk_conn, + msg, rspamd_upstream_name(bk_conn->up), NULL, bk_conn, bk_conn->timeout); } @@ -2030,7 +2030,8 @@ retry: rspamd_http_connection_write_message_shared ( session->master_conn->backend_conn, - msg, NULL, NULL, session->master_conn, + msg, rspamd_upstream_name(session->master_conn->up), + NULL, session->master_conn, session->master_conn->timeout); } else { @@ -2058,7 +2059,8 @@ retry: rspamd_http_connection_write_message ( session->master_conn->backend_conn, - msg, NULL, NULL, session->master_conn, + msg, rspamd_upstream_name(session->master_conn->up), + NULL, session->master_conn, session->master_conn->timeout); } } -- 2.39.5