From: Vsevolod Stakhov Date: Tue, 16 Jul 2019 13:46:57 +0000 (+0100) Subject: [Minor] Fix parsing of the query arguments X-Git-Tag: 2.0~577 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8868de1133e8641bec9218858528b1f175bd10c1;p=rspamd.git [Minor] Fix parsing of the query arguments --- 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); }