mirror of
https://github.com/reactos/wine.git
synced 2025-01-22 11:54:47 +00:00
mshtml: Ignore query and hash parts in res protocol handler.
This commit is contained in:
parent
b84bc52b71
commit
83ceee7424
@ -594,9 +594,9 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
ResProtocol *This = ResProtocol_from_IInternetProtocol(iface);
|
||||
WCHAR *url_dll, *url_file, *url, *mime, *res_type = (LPWSTR)RT_HTML, *ptr;
|
||||
DWORD grfBINDF = 0, len;
|
||||
BINDINFO bindinfo;
|
||||
LPWSTR url_dll, url_file, url, mime, res_type = (LPWSTR)RT_HTML;
|
||||
HMODULE hdll;
|
||||
HRSRC src;
|
||||
HRESULT hres;
|
||||
@ -646,6 +646,12 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
|
||||
res_type = MAKEINTRESOURCEW(RT_HTML);
|
||||
}
|
||||
|
||||
/* Ignore query and hash parts. */
|
||||
if((ptr = strchrW(url_file, '?')))
|
||||
*ptr = 0;
|
||||
if((ptr = strchrW(url_file, '#')))
|
||||
*ptr = 0;
|
||||
|
||||
hdll = LoadLibraryExW(url_dll, NULL, LOAD_LIBRARY_AS_DATAFILE);
|
||||
if(!hdll) {
|
||||
WARN("Could not open dll: %s\n", debugstr_w(url_dll));
|
||||
|
@ -601,6 +601,13 @@ static void test_res_protocol(void)
|
||||
test_res_url("/jstest.html");
|
||||
test_res_url("/Test/res.html");
|
||||
test_res_url("/test/dir/dir2/res.html");
|
||||
|
||||
if(GetProcAddress(LoadLibraryA("urlmon.dll"), "CreateUri")) {
|
||||
test_res_url("/test/dir/dir2/res.html?query_part");
|
||||
test_res_url("/test/dir/dir2/res.html#hash_part");
|
||||
}else {
|
||||
win_skip("IUri not supported\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void do_test_about_protocol(IClassFactory *factory, DWORD bf)
|
||||
|
Loading…
x
Reference in New Issue
Block a user