Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0df41c35
Commit
0df41c35
authored
Feb 13, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Also parse hostnames for news schemes in UrlGetPart().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
05e82ba1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
path.c
dlls/kernelbase/path.c
+6
-3
url.c
dlls/shlwapi/tests/url.c
+7
-8
No files found.
dlls/kernelbase/path.c
View file @
0df41c35
...
...
@@ -4347,12 +4347,15 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
case
URL_PART_HOSTNAME
:
switch
(
scheme
)
{
case
URL_SCHEME_FILE
:
case
URL_SCHEME_FTP
:
case
URL_SCHEME_HTTP
:
case
URL_SCHEME_GOPHER
:
case
URL_SCHEME_TELNET
:
case
URL_SCHEME_FILE
:
case
URL_SCHEME_HTTP
:
case
URL_SCHEME_HTTPS
:
case
URL_SCHEME_TELNET
:
case
URL_SCHEME_NEWS
:
case
URL_SCHEME_NNTP
:
case
URL_SCHEME_SNEWS
:
break
;
default:
*
out_len
=
0
;
...
...
dlls/shlwapi/tests/url.c
View file @
0df41c35
...
...
@@ -728,11 +728,11 @@ static void test_UrlGetPart(void)
{
"local://hostname/"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
},
{
"mailto://hostname/"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
},
{
"mk://hostname/"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
},
{
"news://hostname/"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"hostname"
,
.
todo_hr
=
TRUE
},
{
"nntp://hostname/"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"hostname"
,
.
todo_hr
=
TRUE
},
{
"news://hostname/"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"hostname"
},
{
"nntp://hostname/"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"hostname"
},
{
"res://hostname/"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
},
{
"shell://hostname/"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
},
{
"snews://hostname/"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"hostname"
,
.
todo_hr
=
TRUE
},
{
"snews://hostname/"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"hostname"
},
{
"telnet://hostname/"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"hostname"
},
{
"vbscript://hostname/"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
},
{
"wais://hostname/"
,
URL_PART_HOSTNAME
,
0
,
E_FAIL
},
...
...
@@ -742,9 +742,9 @@ static void test_UrlGetPart(void)
{
"gopher://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"gopher:hostname"
},
{
"http://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"http:hostname"
},
{
"https://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"https:hostname"
},
{
"news://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"news:hostname"
,
.
todo_hr
=
TRUE
},
{
"nntp://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"nntp:hostname"
,
.
todo_hr
=
TRUE
},
{
"snews://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"snews:hostname"
,
.
todo_hr
=
TRUE
},
{
"news://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"news:hostname"
},
{
"nntp://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"nntp:hostname"
},
{
"snews://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"snews:hostname"
},
{
"telnet://hostname/"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"telnet:hostname"
},
};
...
...
@@ -876,8 +876,7 @@ static void test_UrlGetPart(void)
{
ok
(
size
==
wcslen
(
bufferW
),
"Got size %u.
\n
"
,
size
);
MultiByteToWideChar
(
CP_ACP
,
0
,
buffer
,
-
1
,
expectW
,
ARRAY_SIZE
(
expectW
));
todo_wine_if
(
strstr
(
url
,
"news"
)
||
strstr
(
url
,
"nntp"
))
ok
(
!
wcscmp
(
bufferW
,
expectW
),
"Got result %s.
\n
"
,
debugstr_w
(
bufferW
));
ok
(
!
wcscmp
(
bufferW
,
expectW
),
"Got result %s.
\n
"
,
debugstr_w
(
bufferW
));
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment