aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-08 11:12:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-08 11:12:00 +0100
commit538766fc1ecc29a2b2d49eea762ce0d2e02c7610 (patch)
treefd936d36e99cc4cadcac3d942e275e6fa5f195fb
parentb3d04213f7466f084b637d426068068468b36a08 (diff)
downloadrspamd-538766fc1ecc29a2b2d49eea762ce0d2e02c7610.tar.gz
rspamd-538766fc1ecc29a2b2d49eea762ce0d2e02c7610.zip
[Minor] Understand /scan path
-rw-r--r--src/libserver/protocol.c3
-rw-r--r--src/libserver/protocol_internal.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 99e965af1..6992307a2 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -134,6 +134,9 @@ rspamd_protocol_handle_url (struct rspamd_task *task,
if (CMD_CHECK (p, MSG_CMD_SYMBOLS, pathlen)) {
task->cmd = CMD_SYMBOLS;
}
+ else if (CMD_CHECK (p, MSG_CMD_SCAN, pathlen)) {
+ task->cmd = CMD_CHECK_V2;
+ }
else if (CMD_CHECK (p, MSG_CMD_SKIP, pathlen)) {
task->cmd = CMD_SKIP;
}
diff --git a/src/libserver/protocol_internal.h b/src/libserver/protocol_internal.h
index f1897a945..48c1c23f1 100644
--- a/src/libserver/protocol_internal.h
+++ b/src/libserver/protocol_internal.h
@@ -27,6 +27,7 @@
* Modern check version
*/
#define MSG_CMD_CHECK_V2 "checkv2"
+#define MSG_CMD_SCAN "scan"
/*
* Check if message is spam or not, and return score plus list