diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-08-17 17:03:04 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-08-17 17:03:04 +0100 |
commit | ac1dfb0beccf74a9f3ec82dfc257ea326532370d (patch) | |
tree | 8d2eeda3f873b982e50629c5fc261900bf8cbdda | |
parent | 85808f5e8da889d9c9420094eb5f16b923be77eb (diff) | |
download | rspamd-ac1dfb0beccf74a9f3ec82dfc257ea326532370d.tar.gz rspamd-ac1dfb0beccf74a9f3ec82dfc257ea326532370d.zip |
Write custom headers in the output.
-rw-r--r-- | src/libserver/protocol.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 1b174b122..650becbe4 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -751,6 +751,15 @@ rspamd_protocol_http_reply (struct rspamd_http_message *msg, if (!task->no_log) { rspamd_roll_history_update (task->worker->srv->history, task); } + + /* Write custom headers */ + g_hash_table_iter_init (&hiter, task->reply_headers); + while (g_hash_table_iter_next (&hiter, &h, &v)) { + GString *hn = (GString *)h, *hv = (GString *)v; + + rspamd_http_message_add_header (msg, hn->str, hv->str); + } + g_hash_table_iter_init (&hiter, task->results); top = ucl_object_typed_new (UCL_OBJECT); |