Check that there is no zone or zone is "GMT" in parse_date_elements().
Make sure there is no junk at the end of date in parse_date().
This will affect Date, IMS, and other date-carrying header fields recognized
by Squid but should not cause any messages to be rejected. Squid would just
ignore the malformed headers as if they are not there.
Co-Advisor test case:
test_case/rfc2616/invalidExpiresMakesStale-rfc1123x
char *t;
memset(&tm, 0, sizeof(tm));
- if (!day || !month || !year || !aTime)
+ if (!day || !month || !year || !aTime || (zone && strcmp(zone, "GMT")))
return NULL;
tm.tm_mday = atoi(day);
tm.tm_mon = make_month(month);
timestr = t;
else if (!year)
year = t;
+ else
+ return NULL;
} else if (!wday)
wday = t;
else if (!month)
month = t;
else if (!zone)
zone = t;
+ else
+ return NULL;
}
tm = parse_date_elements(day, month, year, timestr, zone);