aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-18 16:10:04 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-18 16:10:04 +0100
commitaf204fee67890fd8e1043042f94ce2e9b9205bc6 (patch)
tree0dc3b907c61b95fddeb112bf943adb639715e32e /src/rspamd_proxy.c
parentaac1013122301ec3a6bb39264d90627c6c245518 (diff)
downloadrspamd-af204fee67890fd8e1043042f94ce2e9b9205bc6.tar.gz
rspamd-af204fee67890fd8e1043042f94ce2e9b9205bc6.zip
[Project] Add message block support to the client
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index cca9f792f..70e393ddd 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -1066,7 +1066,7 @@ proxy_request_compress (struct rspamd_http_message *msg)
flags = rspamd_http_message_get_flags (msg);
- if (!rspamd_http_message_find_header (msg, "Compression")) {
+ if (!rspamd_http_message_find_header (msg, COMPRESSION_HEADER)) {
if ((flags & RSPAMD_HTTP_FLAG_SHMEM) ||
!(flags & RSPAMD_HTTP_FLAG_HAS_BODY)) {
/* Cannot compress shared or empty message */
@@ -1094,7 +1094,7 @@ proxy_request_compress (struct rspamd_http_message *msg)
ZSTD_freeCCtx (zctx);
rspamd_http_message_set_body_from_fstring_steal (msg, body);
- rspamd_http_message_add_header (msg, "Compression", "zstd");
+ rspamd_http_message_add_header (msg, COMPRESSION_HEADER, "zstd");
}
}
@@ -1108,7 +1108,7 @@ proxy_request_decompress (struct rspamd_http_message *msg)
ZSTD_inBuffer zin;
ZSTD_outBuffer zout;
- if (rspamd_http_message_find_header (msg, "Compression")) {
+ if (rspamd_http_message_find_header (msg, COMPRESSION_HEADER)) {
in = rspamd_http_message_get_body (msg, &inlen);
if (in == NULL || inlen == 0) {
@@ -1154,7 +1154,7 @@ proxy_request_decompress (struct rspamd_http_message *msg)
body->len = zout.pos;
ZSTD_freeDStream (zstream);
rspamd_http_message_set_body_from_fstring_steal (msg, body);
- rspamd_http_message_remove_header (msg, "Compression");
+ rspamd_http_message_remove_header (msg, COMPRESSION_HEADER);
}
}