diff options
-rw-r--r-- | src/cache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cache.c b/src/cache.c index 2bd7bb58..7c1d2991 100644 --- a/src/cache.c +++ b/src/cache.c @@ -585,7 +585,6 @@ static char *Cache_parse_field(const char *header, const char *fieldname) } i += j; - while (header[i] == ' ') i++; if (header[i] == ':') { /* Field found! */ while (header[++i] == ' ' || header[i] == '\t'); @@ -595,6 +594,7 @@ static char *Cache_parse_field(const char *header, const char *fieldname) field = dStrndup(header + i, j); return field; } + while (header[i] != '\n') i++; } return NULL; } @@ -621,7 +621,6 @@ static Dlist *Cache_parse_multiple_fields(const char *header, } i += j; - for ( ; header[i] == ' '; i++); if (header[i] == ':') { /* Field found! */ while (header[++i] == ' ' || header[i] == '\t'); @@ -630,6 +629,8 @@ static Dlist *Cache_parse_multiple_fields(const char *header, j--; field = dStrndup(header + i, j); dList_append(fields, field); + } else { + while (header[i] != '\n') i++; } } |