]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
* Do not read http reply when we got 304 reply code
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 23 Sep 2009 15:12:03 +0000 (19:12 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 23 Sep 2009 15:12:03 +0000 (19:12 +0400)
src/map.c

index 147b06515e9b89ebe7f0b114d7887dacc1ac8bda..950a154d8a6f99bf719f042d4b1704ca71c1cea3 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -287,6 +287,10 @@ read_http_common (struct rspamd_map *map, struct http_map_data *data, struct htt
                                msg_err ("read_http: got error reply from server %s, %d", data->host, reply->code);
                                return FALSE;
                        }
+                       else if (reply->code == 304) {
+                               /* Do not read anything */
+                               return FALSE;
+                       }
                        pos = buf;
                        if (!data->chunked && (te = g_hash_table_lookup (reply->headers, "Transfer-Encoding")) != NULL) {
                                if (g_ascii_strcasecmp (te, "chunked") == 0) {