diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-25 13:37:38 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-25 13:37:38 +0000 |
commit | d2e806d902f1469e87070b340291d21fa04fc26a (patch) | |
tree | 0019f140cb74a29acb4c872519c274225222902d /src/rspamd_proxy.c | |
parent | 9467740fff260eeeaf34aef3782ffd3e4afb923f (diff) | |
download | rspamd-d2e806d902f1469e87070b340291d21fa04fc26a.tar.gz rspamd-d2e806d902f1469e87070b340291d21fa04fc26a.zip |
[Fix] Better handling of the legacy protocol
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r-- | src/rspamd_proxy.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index 5b2206be4..12b14bc92 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -20,6 +20,7 @@ #include "libutil/http.h" #include "libutil/http_private.h" #include "libserver/protocol.h" +#include "libserver/protocol_internal.h" #include "libserver/cfg_file.h" #include "libserver/url.h" #include "libserver/dns.h" @@ -1885,16 +1886,17 @@ proxy_client_finish_handler (struct rspamd_http_connection *conn, if (msg->flags & RSPAMD_HTTP_FLAG_SPAMC) { session->legacy_support = LEGACY_SUPPORT_SPAMC; + msg_info_session ("enabling legacy spamc mode for session"); } else { - session->legacy_support = LEGACY_SUPPORT_SPAMC; + session->legacy_support = LEGACY_SUPPORT_RSPAMC; + msg_info_session ("enabling legacy rspamc mode for session"); } - - msg_info_session ("enabling legacy rspamc mode for session"); } if (msg->url->len == 0) { - msg->url = rspamd_fstring_append (msg->url, "/check", strlen ("/check")); + msg->url = rspamd_fstring_append (msg->url, + "/" MSG_CMD_CHECK_V2, strlen ("/" MSG_CMD_CHECK_V2)); } if (!proxy_check_file (msg, session)) { |