From 77821095d27acf3d4a6456a2305167a6633a1422 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 30 Apr 2019 17:42:33 +0100 Subject: [PATCH] [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); } -- 2.39.5