this should fix ubisoft connect outputting unknown timezone UTC in logs
-- v4: wininet/tests: Add test for UTC timezone.
From: Etaash Mathamsetty etaash.mathamsetty@gmail.com
--- dlls/wininet/tests/http.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index efa3e5928b6..380abe43bcc 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -2125,6 +2125,15 @@ static const char okmsg2[] = "Set-Cookie: two\r\n" "\r\n";
+static const char okmsg3[] = +"HTTP/1.1 200 OK\r\n" +"Date: Mon, 01 Dec 2008 13:44:34 UTC\r\n" +"Server: winetest\r\n" +"Content-Length: 0\r\n" +"Set-Cookie: one\r\n" +"Set-Cookie: two\r\n" +"\r\n"; + static DWORD64 content_length; static const char largemsg[] = "HTTP/1.1 200 OK\r\n" @@ -2357,6 +2366,7 @@ static DWORD CALLBACK server_thread(LPVOID param) if (strstr(buffer, "/testD")) { send(c, okmsg2, sizeof okmsg2-1, 0); + send(c, okmsg3, sizeof okmsg3-1, 0); } if (strstr(buffer, "/testE")) {
From: Etaash Mathamsetty etaash.mathamsetty@gmail.com
--- dlls/wininet/http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index b42f823208c..6c722d7e9df 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -4432,7 +4432,7 @@ static BOOL HTTP_ParseDateAsAsctime(LPCWSTR value, FILETIME *ft) /* asctime() doesn't report a timezone, but some web servers do, so accept * with or without GMT. */ - if (*ptr && wcscmp(ptr, L"GMT")) + if (*ptr && (wcscmp(ptr, L"GMT") && wcscmp(ptr, L"UTC"))) { ERR("unexpected timezone %s\n", debugstr_w(ptr)); return FALSE; @@ -4509,7 +4509,7 @@ static BOOL HTTP_ParseRfc1123Date(LPCWSTR value, FILETIME *ft) while (iswspace(*ptr)) ptr++;
- if (wcscmp(ptr, L"GMT")) + if (wcscmp(ptr, L"GMT") && wcscmp(ptr, L"UTC")) { ERR("unexpected time zone %s\n", debugstr_w(ptr)); return FALSE; @@ -4626,7 +4626,7 @@ static BOOL HTTP_ParseRfc850Date(LPCWSTR value, FILETIME *ft) while (iswspace(*ptr)) ptr++;
- if (wcscmp(ptr, L"GMT")) + if (wcscmp(ptr, L"GMT") && wcscmp(ptr, L"UTC")) { ERR("unexpected time zone %s\n", debugstr_w(ptr)); return FALSE;
v2: added some tests