]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix invocation
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 11 Mar 2024 19:03:08 +0000 (19:03 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 11 Mar 2024 19:03:08 +0000 (19:03 +0000)
src/controller.c
src/libserver/protocol.c
src/rspamd_proxy.c

index 0ea1b0f046cd308e49b1da947baabc94fcbbe3b6..e68e10cedf78601d348a8931322deb5eb135b54f 100644 (file)
@@ -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;
        }
index 5993da61ed28b767117f10c6e38dd1dc06ba7724..a251dcd05932817f92316492809bbe10df2dae18 100644 (file)
@@ -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;
        }
index ad6edd333872e5c308a81f5983c54ee2831f8296..531a27be765b758a021d0418289729a57e476281 100644 (file)
@@ -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;
        }