diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-04 18:31:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-04 18:31:28 +0100 |
commit | d8555003485d0a47d88ec7a80a717c730e85ffbd (patch) | |
tree | 3f0b5e43a3fd26e2524fe5e05eeb500b8772d4d3 /src/libserver/task.h | |
parent | a569362933d9fb6993721d68a3e3179bb5ac7b6c (diff) | |
download | rspamd-d8555003485d0a47d88ec7a80a717c730e85ffbd.tar.gz rspamd-d8555003485d0a47d88ec7a80a717c730e85ffbd.zip |
[Fix] Fix multiple request headers structure
Diffstat (limited to 'src/libserver/task.h')
-rw-r--r-- | src/libserver/task.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libserver/task.h b/src/libserver/task.h index 80fdb82a3..c76dd614e 100644 --- a/src/libserver/task.h +++ b/src/libserver/task.h @@ -277,6 +277,33 @@ gdouble rspamd_task_get_required_score (struct rspamd_task *task, struct metric_result *m); /** + * Returns the first header as value for a header + * @param task + * @param name + * @return + */ +rspamd_ftok_t * rspamd_task_get_request_header (struct rspamd_task *task, + const gchar *name); + +/** + * Returns all headers with the specific name + * @param task + * @param name + * @return + */ +GPtrArray* rspamd_task_get_request_header_multiple (struct rspamd_task *task, + const gchar *name); + +/** + * Adds a new request header to task (name and value should be mapped to fstring) + * @param task + * @param name + * @param value + */ +void rspamd_task_add_request_header (struct rspamd_task *task, + rspamd_ftok_t *name, rspamd_ftok_t *value); + +/** * Write log line about the specified task if needed */ void rspamd_task_write_log (struct rspamd_task *task); |