wininet: Do case-insensitive compare when looking for scheme.

This commit is contained in:
Piotr Caban 2013-04-01 13:11:37 +02:00 committed by Alexandre Julliard
parent 7d61c7b158
commit c8d1d76909
2 changed files with 4 additions and 1 deletions

View File

@ -1580,7 +1580,7 @@ static INTERNET_SCHEME GetInternetSchemeW(LPCWSTR lpszScheme, DWORD nMaxCmp)
return INTERNET_SCHEME_UNKNOWN;
for (i = 0; i < sizeof(url_schemes)/sizeof(url_schemes[0]); i++)
if (!strncmpW(lpszScheme, url_schemes[i], nMaxCmp))
if (!strncmpiW(lpszScheme, url_schemes[i], nMaxCmp))
return INTERNET_SCHEME_FIRST + i;
return INTERNET_SCHEME_UNKNOWN;

View File

@ -127,6 +127,9 @@ static const crack_url_test_t crack_url_tests[] = {
{"http://www.winehq.org/myscript.php;test=123",
0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 22, -1, 0,
"http", "www.winehq.org", "", "", "/myscript.php;test=123", ""},
{"HtTp://www.winehq.org/scheme",
0, 4, INTERNET_SCHEME_HTTP, 7, 14, 23, 80, -1, 0, -1, 0, 21, 7, -1, 0,
"HtTp", "www.winehq.org", "", "", "/scheme", ""},
{"file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml",
0, 4, INTERNET_SCHEME_FILE, -1, 0, -1, 0, -1, 0, -1, 0, 7, 55, -1, 0,
"file", "", "", "", "C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml", ""},