aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-03-11 19:03:08 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-03-11 19:03:08 +0000
commitfa45782ada5d6074e74f5690994a00437965d3d2 (patch)
tree62f03bf205fecfa9f38398a7973b78c820c88c3f /src
parent9b78be4f03b67d4feca3081b9427ac5ed1d241c9 (diff)
downloadrspamd-fa45782ada5d6074e74f5690994a00437965d3d2.tar.gz
rspamd-fa45782ada5d6074e74f5690994a00437965d3d2.zip
[Minor] Fix invocation
Diffstat (limited to 'src')
-rw-r--r--src/controller.c2
-rw-r--r--src/libserver/protocol.c2
-rw-r--r--src/rspamd_proxy.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/controller.c b/src/controller.c
index 0ea1b0f04..e68e10ced 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -2008,7 +2008,7 @@ rspamd_controller_scan_reply(struct rspamd_task *task)
const rspamd_ftok_t *accept_hdr = rspamd_task_get_request_header(task, "Accept");
if (accept_hdr && rspamd_substring_search(accept_hdr->begin, accept_hdr->len,
- "application/msgpack", sizeof("application/msgpack") - 1)) {
+ "application/msgpack", sizeof("application/msgpack") - 1) != -1) {
ctype = "application/msgpack";
out_type = UCL_EMIT_MSGPACK;
}
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 5993da61e..a251dcd05 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -2116,7 +2116,7 @@ void rspamd_protocol_write_reply(struct rspamd_task *task, ev_tstamp timeout)
accept_hdr = rspamd_task_get_request_header(task, "Accept");
if (accept_hdr && rspamd_substring_search(accept_hdr->begin, accept_hdr->len,
- "application/msgpack", sizeof("application/msgpack") - 1)) {
+ "application/msgpack", sizeof("application/msgpack") - 1) != -1) {
ctype = "application/msgpack";
out_type = UCL_EMIT_MSGPACK;
}
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index ad6edd333..531a27be7 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -1718,7 +1718,7 @@ rspamd_proxy_scan_self_reply(struct rspamd_task *task)
const rspamd_ftok_t *accept_hdr = rspamd_task_get_request_header(task, "Accept");
if (accept_hdr && rspamd_substring_search(accept_hdr->begin, accept_hdr->len,
- "application/msgpack", sizeof("application/msgpack") - 1)) {
+ "application/msgpack", sizeof("application/msgpack") - 1) != -1) {
ctype = "application/msgpack";
out_type = UCL_EMIT_MSGPACK;
}