diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-08 18:42:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-08 18:42:42 +0100 |
commit | d763da74c87b5939c2bcfdfdfea71c15245cfd20 (patch) | |
tree | b6a2eda4869f79f4ba426b31cb9b08bc1a341e0e /src/client/rspamc.c | |
parent | 896e9ed7313db70acd5085405ca796cdcd56d32e (diff) | |
download | rspamd-d763da74c87b5939c2bcfdfdfea71c15245cfd20.tar.gz rspamd-d763da74c87b5939c2bcfdfdfea71c15245cfd20.zip |
[Feature] Add compression support to rspamd client
Diffstat (limited to 'src/client/rspamc.c')
-rw-r--r-- | src/client/rspamc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 1d2dd39ca..92983b491 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -57,6 +57,7 @@ static gboolean raw = FALSE; static gboolean extended_urls = FALSE; static gboolean mime_output = FALSE; static gboolean empty_input = FALSE; +static gboolean compressed = FALSE; static gchar *key = NULL; static GList *children; @@ -136,6 +137,8 @@ static GOptionEntry entries[] = "Allow empty input instead of reading from stdin", NULL }, { "fuzzy-symbol", 'S', 0, G_OPTION_ARG_STRING, &fuzzy_symbol, "Learn the specified fuzzy symbol", NULL }, + { "compressed", 'z', 0, G_OPTION_ARG_NONE, &compressed, + "Enable zstd compression", NULL }, { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } }; @@ -1383,7 +1386,7 @@ rspamc_process_input (struct event_base *ev_base, struct rspamc_command *cmd, if (cmd->need_input) { rspamd_client_command (conn, cmd->path, attrs, in, rspamc_client_cb, - cbdata, &err); + cbdata, compressed, &err); } else { rspamd_client_command (conn, @@ -1392,6 +1395,7 @@ rspamc_process_input (struct event_base *ev_base, struct rspamc_command *cmd, NULL, rspamc_client_cb, cbdata, + compressed, &err); } } |