urlmon: Make file protocol invalid URL handling behave like IE7.
This commit is contained in:
parent
3bda54bb04
commit
c42d937402
|
@ -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,
|
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||||
pOIBindInfo, grfPI, dwReserved);
|
pOIBindInfo, grfPI, dwReserved);
|
||||||
|
|
||||||
|
if(!szUrl || lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|
||||||
|
|| memcmp(szUrl, wszFile, sizeof(wszFile)))
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
memset(&bindinfo, 0, sizeof(bindinfo));
|
memset(&bindinfo, 0, sizeof(bindinfo));
|
||||||
bindinfo.cbSize = sizeof(BINDINFO);
|
bindinfo.cbSize = sizeof(BINDINFO);
|
||||||
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
|
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
|
||||||
|
@ -119,13 +123,6 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
|
||||||
|
|
||||||
ReleaseBindInfo(&bindinfo);
|
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;
|
len = lstrlenW(szUrl)+16;
|
||||||
url = heap_alloc(len*sizeof(WCHAR));
|
url = heap_alloc(len*sizeof(WCHAR));
|
||||||
hres = CoInternetParseUrl(szUrl, PARSE_ENCODE, 0, url, len, &len, 0);
|
hres = CoInternetParseUrl(szUrl, PARSE_ENCODE, 0, url, len, &len, 0);
|
||||||
|
|
Loading…
Reference in New Issue