Commit 3f8f23c0 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

shlwapi: Lowercase schemes in UrlCombine function.

(cherry picked from commit 3f6142e0)
parent 01d46ff3
...@@ -662,7 +662,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, ...@@ -662,7 +662,7 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
{ {
PARSEDURLW base, relative; PARSEDURLW base, relative;
DWORD myflags, sizeloc = 0; DWORD myflags, sizeloc = 0;
DWORD len, res1, res2, process_case = 0; DWORD i, len, res1, res2, process_case = 0;
LPWSTR work, preliminary, mbase, mrelative; LPWSTR work, preliminary, mbase, mrelative;
static const WCHAR myfilestr[] = {'f','i','l','e',':','/','/','/','\0'}; static const WCHAR myfilestr[] = {'f','i','l','e',':','/','/','/','\0'};
HRESULT ret; HRESULT ret;
...@@ -703,6 +703,10 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, ...@@ -703,6 +703,10 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
else do { else do {
BOOL manual_search = FALSE; BOOL manual_search = FALSE;
work = (LPWSTR)base.pszProtocol;
for(i=0; i<base.cchProtocol; i++)
work[i] = tolowerW(work[i]);
/* mk is a special case */ /* mk is a special case */
if(base.nScheme == URL_SCHEME_MK) { if(base.nScheme == URL_SCHEME_MK) {
static const WCHAR wsz[] = {':',':',0}; static const WCHAR wsz[] = {':',':',0};
...@@ -826,7 +830,11 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, ...@@ -826,7 +830,11 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative,
} }
process_case = (*base.pszSuffix == '/' || base.nScheme == URL_SCHEME_MK) ? 5 : 3; process_case = (*base.pszSuffix == '/' || base.nScheme == URL_SCHEME_MK) ? 5 : 3;
break; break;
} }else {
work = (LPWSTR)relative.pszProtocol;
for(i=0; i<relative.cchProtocol; i++)
work[i] = tolowerW(work[i]);
}
/* handle cases where pszRelative has scheme */ /* handle cases where pszRelative has scheme */
if ((base.cchProtocol == relative.cchProtocol) && if ((base.cchProtocol == relative.cchProtocol) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment