From: Vsevolod Stakhov Date: Mon, 25 Apr 2022 20:30:23 +0000 (+0100) Subject: [Fix] Properly set `Host` in rspamd_proxy X-Git-Tag: 3.3~299 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=debd36af7a2e4af9bde4331c150fe0526596e95e;p=rspamd.git [Fix] Properly set `Host` in rspamd_proxy --- 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); } }