shlwapi: Make ParseURL case-insensitive.

Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Daniel Lehman 2016-11-10 06:56:15 -08:00 committed by Alexandre Julliard
parent bf3c65c6d8
commit 6cbcc76e41
2 changed files with 2 additions and 1 deletions

View File

@ -1435,6 +1435,7 @@ static const struct parse_url_test_t {
{"htt?p://www.winehq.org/",URL_E_INVALID_SYNTAX},
{"ab-://www.winehq.org/",S_OK,3,URL_SCHEME_UNKNOWN},
{" http://www.winehq.org/",URL_E_INVALID_SYNTAX},
{"HTTP://www.winehq.org/",S_OK,4,URL_SCHEME_HTTP},
};
static void test_ParseURL(void)

View File

@ -138,7 +138,7 @@ static DWORD get_scheme_code(LPCWSTR scheme, DWORD scheme_len)
for(i=0; i < sizeof(shlwapi_schemes)/sizeof(shlwapi_schemes[0]); i++) {
if(scheme_len == strlenW(shlwapi_schemes[i].scheme_name)
&& !memcmp(scheme, shlwapi_schemes[i].scheme_name, scheme_len*sizeof(WCHAR)))
&& !memicmpW(scheme, shlwapi_schemes[i].scheme_name, scheme_len))
return shlwapi_schemes[i].scheme_number;
}