summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-08 17:41:55 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-08 17:41:55 +0100
commit4106c09059483cfb2f905e833bdb1fb447dbddbf (patch)
tree54ee0333d5beead1786fa2b9187c2c0271010f92 /src
parent25bbf81895eecf72c7b89fe35d608f69968f91fc (diff)
downloadrspamd-4106c09059483cfb2f905e833bdb1fb447dbddbf.tar.gz
rspamd-4106c09059483cfb2f905e833bdb1fb447dbddbf.zip
[Minor] Add implicit Content-Type for milter proxied requests
Diffstat (limited to 'src')
-rw-r--r--src/rspamd_proxy.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index f579ec5c5..fb782d3eb 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -1281,6 +1281,17 @@ proxy_open_mirror_connections (struct rspamd_proxy_session *session)
if (m->compress) {
proxy_request_compress (msg);
+
+ if (session->client_milter_conn) {
+ rspamd_http_message_add_header (msg, "Content-Type",
+ "application/octet-stream");
+ }
+ }
+ else {
+ if (session->client_milter_conn) {
+ rspamd_http_message_add_header (msg, "Content-Type",
+ "text/plain");
+ }
}
rspamd_http_connection_write_message (bk_conn->backend_conn,
@@ -1660,6 +1671,16 @@ retry:
if (backend->compress) {
proxy_request_compress (msg);
+ if (session->client_milter_conn) {
+ rspamd_http_message_add_header (msg, "Content-Type",
+ "application/octet-stream");
+ }
+ }
+ else {
+ if (session->client_milter_conn) {
+ rspamd_http_message_add_header (msg, "Content-Type",
+ "text/plain");
+ }
}
rspamd_http_connection_write_message (