]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Don't add User-Agent in HTTP replies
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 30 Apr 2019 16:42:33 +0000 (17:42 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 30 Apr 2019 16:42:33 +0000 (17:42 +0100)
src/libutil/http_connection.c

index f4f494cf6b94f5af5081aa9cf3104d3ea8f0b96a..aa964f417ab112be4a33ba3f65b5cc5d66cd9087 100644 (file)
@@ -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);
        }