parsedate: allow time specified without seconds

The date format in RFC822 allows that the seconds part of HH:MM:SS is
left out, but this function didn't allow it. This change also includes a
modified test case that makes sure that this now works.

Reported by: Matt Ford
Bug: http://curl.haxx.se/bug/view.cgi?id=3076529
This commit is contained in:
Daniel Stenberg
2010-09-27 16:54:02 +02:00
parent 33c3bb057b
commit 4d58f97f60
3 changed files with 9 additions and 0 deletions

View File

@@ -97,6 +97,8 @@ static const char *dates[]={
"Thu, 999999999999-Aug-2007 20:49:07 GMT",
"Thu, 12-Aug-2007 20:61:99999999999 GMT",
"IAintNoDateFool",
"Thu Apr 18 22:50 2007 GMT", /* without seconds */
NULL
};