diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/cache.c | 13 |
2 files changed, 11 insertions, 3 deletions
@@ -69,6 +69,7 @@ dillo-fltk2 - Added more statics in dpi, const in pixmaps, and removed redundant includes. - Made cleanups in prefs (hiding local data/defs/symbols). - Fixed a segfault in cookies.c when no .dillo directory exists. + - Added a MSG_HTTP for HTTP/1.1's warning headers. Patches: place +- Fixed a problem with locally-installed dpis. - Added code for optional image loading (nice interface) very advanced! diff --git a/src/cache.c b/src/cache.c index 0d8b537c..2336fb93 100644 --- a/src/cache.c +++ b/src/cache.c @@ -417,7 +417,6 @@ static char *Cache_parse_field(const char *header, const char *fieldname) return NULL; } -#ifndef DISABLE_COOKIES /* * Extract multiple fields from the header. */ @@ -451,7 +450,6 @@ static Dlist *Cache_parse_multiple_fields(const char *header, } return fields; } -#endif /* !DISABLE_COOKIES */ /* * Scan, allocate, and set things according to header info. @@ -463,9 +461,10 @@ static void Cache_parse_header(CacheEntry_t *entry) char *Length, *Type, *location_str, *encoding; #ifndef DISABLE_COOKIES Dlist *Cookies; +#endif + Dlist *warnings; void *data; int i; -#endif if (entry->Header->len > 12) { if (header[9] == '1' && header[10] == '0' && header[11] == '0') { @@ -493,6 +492,14 @@ static void Cache_parse_header(CacheEntry_t *entry) } } + if ((warnings = Cache_parse_multiple_fields(header, "Warning"))) { + for (i = 0; (data = dList_nth_data(warnings, i)); ++i) { + MSG_HTTP("%s\n", (char *)data); + dFree(data); + } + dList_free(warnings); + } + if ((Length = Cache_parse_field(header, "Content-Length")) != NULL) { char *tmp; if ((tmp = Cache_parse_field(header, "Transfer-Encoding"))) { |