commit debd36a: [Fix] Properly set `Host` in rspamd_proxy

Vsevolod Stakhov vsevolod at rspamd.com
Mon Apr 25 20:35:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-04-25 21:30:23 +0100
URL: https://github.com/rspamd/rspamd/commit/debd36af7a2e4af9bde4331c150fe0526596e95e

[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);
 		}
 	}


More information about the Commits mailing list