Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
439600d5
Commit
439600d5
authored
Feb 16, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Prepend the scheme even if the requested URL part is empty.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
91ae5ffe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
42 deletions
+7
-42
path.c
dlls/kernelbase/path.c
+6
-41
url.c
dlls/shlwapi/tests/url.c
+1
-1
No files found.
dlls/kernelbase/path.c
View file @
439600d5
...
...
@@ -4277,12 +4277,6 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
{
case
URL_PART_SCHEME
:
flags
&=
~
URL_PARTFLAG_KEEPSCHEME
;
if
(
!
pl
.
scheme_len
)
{
*
out
=
'\0'
;
*
out_len
=
0
;
return
S_FALSE
;
}
addr
=
pl
.
scheme
;
size
=
pl
.
scheme_len
;
break
;
...
...
@@ -4290,30 +4284,19 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
case
URL_PART_HOSTNAME
:
if
(
scheme
==
URL_SCHEME_FILE
&&
(
!
pl
.
hostname_len
||
(
pl
.
hostname_len
==
1
&&
*
(
pl
.
hostname
+
1
)
==
':'
)))
{
*
out
=
'\0'
;
*
out_len
=
0
;
return
S_FALSE
;
addr
=
NULL
;
size
=
0
;
}
if
(
!
pl
.
hostname_len
)
else
{
*
out
=
'\0'
;
*
out_len
=
0
;
return
S_FALSE
;
addr
=
pl
.
hostname
;
size
=
pl
.
hostname_len
;
}
addr
=
pl
.
hostname
;
size
=
pl
.
hostname_len
;
break
;
case
URL_PART_USERNAME
:
if
(
!
pl
.
username
)
return
E_INVALIDARG
;
if
(
!
pl
.
username_len
)
{
*
out
=
'\0'
;
*
out_len
=
0
;
return
S_FALSE
;
}
addr
=
pl
.
username
;
size
=
pl
.
username_len
;
break
;
...
...
@@ -4321,12 +4304,6 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
case
URL_PART_PASSWORD
:
if
(
!
pl
.
password
)
return
E_INVALIDARG
;
if
(
!
pl
.
password_len
)
{
*
out
=
'\0'
;
*
out_len
=
0
;
return
S_FALSE
;
}
addr
=
pl
.
password
;
size
=
pl
.
password_len
;
break
;
...
...
@@ -4334,24 +4311,12 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
case
URL_PART_PORT
:
if
(
!
pl
.
port
)
return
E_INVALIDARG
;
if
(
!
pl
.
port_len
)
{
*
out
=
'\0'
;
*
out_len
=
0
;
return
S_FALSE
;
}
addr
=
pl
.
port
;
size
=
pl
.
port_len
;
break
;
case
URL_PART_QUERY
:
flags
&=
~
URL_PARTFLAG_KEEPSCHEME
;
if
(
!
pl
.
query_len
)
{
*
out
=
'\0'
;
*
out_len
=
0
;
return
S_FALSE
;
}
addr
=
pl
.
query
;
size
=
pl
.
query_len
;
break
;
...
...
@@ -4401,7 +4366,7 @@ HRESULT WINAPI UrlGetPartW(const WCHAR *url, WCHAR *out, DWORD *out_len, DWORD p
}
TRACE
(
"len=%ld %s
\n
"
,
*
out_len
,
wine_dbgstr_w
(
out
));
return
S_OK
;
return
*
out_len
?
S_OK
:
S_FALSE
;
}
BOOL
WINAPI
UrlIsA
(
const
char
*
url
,
URLIS
Urlis
)
...
...
dlls/shlwapi/tests/url.c
View file @
439600d5
...
...
@@ -681,7 +681,7 @@ static void test_UrlGetPart(void)
{
"http://host: !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
,
URL_PART_PORT
,
0
,
S_OK
,
" !
\"
$%&'()*+,-.;<=>[]^_`{|~}
\x01\x7f\xff
"
},
{
"http:///index.html"
,
URL_PART_HOSTNAME
,
0
,
S_FALSE
,
""
},
{
"http:///index.html"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"http:"
,
.
todo_hr
=
TRUE
},
{
"http:///index.html"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"http:"
},
{
"file://h o s t/c:/windows/file"
,
URL_PART_HOSTNAME
,
0
,
S_OK
,
"h o s t"
},
{
"file://h o s t/c:/windows/file"
,
URL_PART_HOSTNAME
,
URL_PARTFLAG_KEEPSCHEME
,
S_OK
,
"h o s t"
},
{
"file://foo:bar@localhost:21/file?query=x"
,
URL_PART_USERNAME
,
0
,
E_FAIL
,
.
todo_hr
=
TRUE
},
...
...
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