]> source.dussan.org Git - rspamd.git/commitdiff
Fix headers arguments.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Oct 2015 17:44:30 +0000 (18:44 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Oct 2015 17:44:30 +0000 (18:44 +0100)
doc/rspamc.1
src/client/rspamc.c

index d33f71babfdc65a4dd9c25fd0059b68bc0faef8a..f3fda764d75c8a4689503776764c8243dd145398 100644 (file)
@@ -183,6 +183,14 @@ Output the full mime message instead of scanning results only
 .RS
 .RE
 .TP
+.B \-\-header=\f[I]header\f[]
+Add custom HTTP header for a request.
+You may specify header in format \f[C]name=value\f[] or just
+\f[C]name\f[] for an empty header.
+This option can be repeated multiple times.
+.RS
+.RE
+.TP
 .B \-\-commands
 List available commands
 .RS
index 7c0e76d5c4400d6f573f6ea9ffd6ca5215cf4eba..fbd27a9124cfb3cea37516748700d3a2deb60329 100644 (file)
@@ -437,7 +437,7 @@ add_options (GHashTable *opts)
 
        hdr = http_headers;
 
-       while (*hdr != NULL) {
+       while (hdr != NULL && *hdr != NULL) {
                gchar **kv = g_strsplit_set (*hdr, ":=", 2);
 
                if (kv == NULL || kv[1] == NULL) {