wininet: Handle invalid HTTP time of "0".

oldstable
Juan Lang 2011-05-13 06:47:49 -07:00 committed by Alexandre Julliard
parent 075ad8eae5
commit d797e5fc7e
1 changed files with 7 additions and 1 deletions

View File

@ -4255,9 +4255,15 @@ static BOOL HTTP_ParseRfc1123Date(LPCWSTR value, FILETIME *ft)
*/
static BOOL HTTP_ParseDate(LPCWSTR value, FILETIME *ft)
{
static const WCHAR zero[] = { '0',0 };
BOOL ret;
if (strchrW(value, ','))
if (!strcmpW(value, zero))
{
ft->dwLowDateTime = ft->dwHighDateTime = 0;
ret = TRUE;
}
else if (strchrW(value, ','))
ret = HTTP_ParseRfc1123Date(value, ft);
else
{