diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-10 14:03:29 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-10 14:03:29 +0000 |
commit | 9b2d4615016ae4a93f4db2995eeed3f18f603f20 (patch) | |
tree | 4e971e898e5297235ba05479c38b07f6cd5c350f /src | |
parent | 7961f1c5cd5f1fda3b4d030c04f9ea98ae19422c (diff) | |
download | rspamd-9b2d4615016ae4a93f4db2995eeed3f18f603f20.tar.gz rspamd-9b2d4615016ae4a93f4db2995eeed3f18f603f20.zip |
[Feature] Use Last-Modified header
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/map.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c index 0a4f2d74e..35e0b9a27 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -259,6 +259,13 @@ http_map_finish (struct rspamd_http_connection *conn, if (msg->code == 200) { if (cbd->stage == map_load_file) { + if (msg->last_modified) { + cbd->data->last_checked = msg->last_modified; + } + else { + cbd->data->last_checked = msg->date; + } + /* Maybe we need to check signature ? */ if (map->is_signed) { close (cbd->out_fd); @@ -386,7 +393,6 @@ http_map_finish (struct rspamd_http_connection *conn, map->fin_callback (map->pool, &cbd->cbdata); *map->user_data = cbd->cbdata.cur_data; - cbd->data->last_checked = msg->date; msg_info_pool ("read map data from %s", cbd->data->host); } else if (msg->code == 304 && cbd->stage == map_load_file) { |