diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-16 14:46:57 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-16 14:46:57 +0100 |
commit | 8868de1133e8641bec9218858528b1f175bd10c1 (patch) | |
tree | 03842db8075144d913fdd3331412f71d7b19fc16 /src/libserver/protocol.c | |
parent | 7ffeac6f52de59a57456adbbe075fec0c4cd4c49 (diff) | |
download | rspamd-8868de1133e8641bec9218858528b1f175bd10c1.tar.gz rspamd-8868de1133e8641bec9218858528b1f175bd10c1.zip |
[Minor] Fix parsing of the query arguments
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r-- | src/libserver/protocol.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 4a470e3f0..8c5cd4080 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -204,11 +204,14 @@ rspamd_protocol_handle_url (struct rspamd_task *task, g_hash_table_iter_init (&it, query_args); while (g_hash_table_iter_next (&it, &k, &v)) { + gchar *key_cpy; key = k; value = v; - /* Steal strings */ - g_hash_table_iter_steal (&it); - rspamd_task_add_request_header (task, key, value); + + key_cpy = rspamd_mempool_ftokdup (task->task_pool, key); + + rspamd_http_message_add_header_len (msg, key_cpy, + value->begin, value->len); msg_debug_protocol ("added header \"%T\" -> \"%T\" from HTTP query", key, value); } |