summaryrefslogtreecommitdiff
path: root/src/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cache.c')
-rw-r--r--src/cache.c13
1 files changed, 10 insertions, 3 deletions
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"))) {