From 19c76eefd12831d100036f58ce82bbb4910823b9 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 25 Nov 2014 18:14:28 +0000 Subject: [PATCH] Add --extended-urls option to rspamc. --- src/client/rspamc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 4dd054725..9c2e1976d 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -56,6 +56,7 @@ static gboolean print_commands = FALSE; static gboolean json = FALSE; static gboolean headers = FALSE; static gboolean raw = FALSE; +static gboolean extended_urls = FALSE; static GOptionEntry entries[] = { @@ -103,6 +104,8 @@ static GOptionEntry entries[] = NULL }, { "max-requests", 'n', 0, G_OPTION_ARG_INT, &max_requests, "Maximum count of parallel requests to rspamd", NULL }, + { "extended-urls", 0, 0, G_OPTION_ARG_NONE, &extended_urls, + "Output urls in extended format", NULL }, { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } }; @@ -400,6 +403,9 @@ add_options (GHashTable *opts) rspamd_printf_gstring (numbuf, "%d", flag); g_hash_table_insert (opts, "Flag", numbuf->str); } + if (extended_urls) { + g_hash_table_insert (opts, "URL-Format", "extended"); + } } static void -- 2.39.5