urlmon: Make file protocol invalid URL handling behave like IE7.

This commit is contained in:
Jacek Caban 2008-06-25 19:34:59 -05:00 committed by Alexandre Julliard
parent 3bda54bb04
commit c42d937402

View File

@ -109,6 +109,10 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
pOIBindInfo, grfPI, dwReserved);
if(!szUrl || lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|| memcmp(szUrl, wszFile, sizeof(wszFile)))
return E_INVALIDARG;
memset(&bindinfo, 0, sizeof(bindinfo));
bindinfo.cbSize = sizeof(BINDINFO);
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
@ -119,13 +123,6 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
ReleaseBindInfo(&bindinfo);
if(!szUrl || !*szUrl)
return E_INVALIDARG;
if(lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|| memcmp(szUrl, wszFile, sizeof(wszFile)))
return MK_E_SYNTAX;
len = lstrlenW(szUrl)+16;
url = heap_alloc(len*sizeof(WCHAR));
hres = CoInternetParseUrl(szUrl, PARSE_ENCODE, 0, url, len, &len, 0);