Browse Source

[Minor] Add method to get HTTP message flags

tags/1.6.0
Vsevolod Stakhov 7 years ago
parent
commit
4723fc02be
2 changed files with 13 additions and 0 deletions
  1. 6
    0
      src/libutil/http.c
  2. 7
    0
      src/libutil/http.h

+ 6
- 0
src/libutil/http.c View File

@@ -2463,6 +2463,12 @@ rspamd_http_message_shmem_ref (struct rspamd_http_message *msg)
return NULL;
}

guint
rspamd_http_message_get_flags (struct rspamd_http_message *msg)
{
return msg->flags;
}

void
rspamd_http_message_shmem_unref (struct rspamd_storage_shmem *p)
{

+ 7
- 0
src/libutil/http.h View File

@@ -448,6 +448,13 @@ struct rspamd_storage_shmem* rspamd_http_message_shmem_ref (struct rspamd_http_m
*/
void rspamd_http_message_shmem_unref (struct rspamd_storage_shmem *p);

/**
* Returns message's flags
* @param msg
* @return
*/
guint rspamd_http_message_get_flags (struct rspamd_http_message *msg);

/**
* Parse HTTP date header and return it as time_t
* @param header HTTP date header

Loading…
Cancel
Save