Commit 64cb9425 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Add missing schemes to url_schemes.

Fixes res URL scheme handling. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31399Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f64832fe
...@@ -1572,16 +1572,19 @@ BOOL WINAPI InternetCrackUrlA(const char *url, DWORD url_length, DWORD flags, UR ...@@ -1572,16 +1572,19 @@ BOOL WINAPI InternetCrackUrlA(const char *url, DWORD url_length, DWORD flags, UR
return ret; return ret;
} }
static const WCHAR url_schemes[][7] = static const WCHAR *url_schemes[] =
{ {
{'f','t','p',0}, L"ftp",
{'g','o','p','h','e','r',0}, L"gopher",
{'h','t','t','p',0}, L"http",
{'h','t','t','p','s',0}, L"https",
{'f','i','l','e',0}, L"file",
{'n','e','w','s',0}, L"news",
{'m','a','i','l','t','o',0}, L"mailto",
{'r','e','s',0}, L"socks",
L"javascript",
L"vbscript",
L"res"
}; };
/*********************************************************************** /***********************************************************************
...@@ -4199,7 +4202,7 @@ static LPCWSTR INTERNET_GetSchemeString(INTERNET_SCHEME scheme) ...@@ -4199,7 +4202,7 @@ static LPCWSTR INTERNET_GetSchemeString(INTERNET_SCHEME scheme)
index = scheme - INTERNET_SCHEME_FIRST; index = scheme - INTERNET_SCHEME_FIRST;
if (index >= ARRAY_SIZE(url_schemes)) if (index >= ARRAY_SIZE(url_schemes))
return NULL; return NULL;
return (LPCWSTR)url_schemes[index]; return url_schemes[index];
} }
/* we can calculate using ansi strings because we're just /* we can calculate using ansi strings because we're just
......
...@@ -168,7 +168,10 @@ static const crack_url_test_t crack_url_tests[] = { ...@@ -168,7 +168,10 @@ static const crack_url_test_t crack_url_tests[] = {
"file", "", "", "", "C:\\Program Files\\Atmel\\.\\Asdf.xml", ""}, "file", "", "", "", "C:\\Program Files\\Atmel\\.\\Asdf.xml", ""},
{"C:\\file.txt", {"C:\\file.txt",
0, 1, INTERNET_SCHEME_UNKNOWN, -1, 0, -1, 0, -1, 0, -1, 0, 2, 9, -1, 0, 0, 1, INTERNET_SCHEME_UNKNOWN, -1, 0, -1, 0, -1, 0, -1, 0, 2, 9, -1, 0,
"C", "", "", "", "\\file.txt", ""} "C", "", "", "", "\\file.txt", ""},
{"res://IELib.dll/test.htm",
0, 3, INTERNET_SCHEME_RES, 6, 9, -1, 0, -1, 0, -1, 0, 15, 9, -1, 0,
"res", "IELib.dll", "", "", "/test.htm", ""},
}; };
static WCHAR *a2w(const char *str) static WCHAR *a2w(const char *str)
......
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