commit 7782109: [Minor] Don't add User-Agent in HTTP replies

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Apr 30 16:49:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-04-30 17:42:33 +0100
URL: https://github.com/rspamd/rspamd/commit/77821095d27acf3d4a6456a2305167a6633a1422 (HEAD -> master)

[Minor] Don't add User-Agent in HTTP replies

---
 src/libutil/http_connection.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libutil/http_connection.c b/src/libutil/http_connection.c
index f4f494cf6..aa964f417 100644
--- a/src/libutil/http_connection.c
+++ b/src/libutil/http_connection.c
@@ -1995,7 +1995,7 @@ rspamd_http_connection_write_message_common (struct rspamd_http_connection *conn
 		}
 	}
 
-	if (priv->ctx->config.user_agent) {
+	if (priv->ctx->config.user_agent && conn->type == RSPAMD_HTTP_CLIENT) {
 		rspamd_http_message_add_header (msg, "User-Agent",
 				priv->ctx->config.user_agent);
 	}


More information about the Commits mailing list