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
ea931c82
Commit
ea931c82
authored
May 26, 2021
by
Hans Leidekker
Committed by
Alexandre Julliard
May 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Support IPv6 address format in WsDecodeUrl.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
171de0a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
url.c
dlls/webservices/tests/url.c
+4
-0
url.c
dlls/webservices/url.c
+11
-5
No files found.
dlls/webservices/tests/url.c
View file @
ea931c82
...
...
@@ -50,6 +50,8 @@ static void test_WsDecodeUrl(void)
static
const
WCHAR
url25
[]
=
L"http://host?query%202"
;
static
const
WCHAR
url26
[]
=
L"http://host#frag%202"
;
static
const
WCHAR
url27
[]
=
L"http://host/%c3%ab/"
;
static
const
WCHAR
url28
[]
=
L"net.tcp://[::1]"
;
static
const
WCHAR
url29
[]
=
L"net.tcp://[::1]:1111"
;
static
const
struct
{
const
WCHAR
*
str
;
...
...
@@ -97,6 +99,8 @@ static void test_WsDecodeUrl(void)
{
url25
,
S_OK
,
WS_URL_HTTP_SCHEME_TYPE
,
url25
+
7
,
4
,
80
,
NULL
,
0
,
NULL
,
0
,
L"query 2"
,
7
},
{
url26
,
S_OK
,
WS_URL_HTTP_SCHEME_TYPE
,
url26
+
7
,
4
,
80
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
L"frag 2"
,
6
},
{
url27
,
S_OK
,
WS_URL_HTTP_SCHEME_TYPE
,
url27
+
7
,
4
,
80
,
NULL
,
0
,
L"/
\x00eb
/"
,
3
},
{
url28
,
S_OK
,
WS_URL_NETTCP_SCHEME_TYPE
,
url28
+
10
,
5
,
808
,
NULL
,
0
,
NULL
,
0
},
{
url29
,
S_OK
,
WS_URL_NETTCP_SCHEME_TYPE
,
url29
+
10
,
5
,
1111
,
url29
+
16
,
4
,
NULL
,
0
},
};
WS_HEAP
*
heap
;
WS_STRING
str
;
...
...
dlls/webservices/url.c
View file @
ea931c82
...
...
@@ -169,16 +169,14 @@ static WCHAR *url_decode( WCHAR *str, ULONG len, WS_HEAP *heap, ULONG *ret_len )
/**************************************************************************
* WsDecodeUrl [webservices.@]
*/
HRESULT
WINAPI
WsDecodeUrl
(
const
WS_STRING
*
str
,
ULONG
flags
,
WS_HEAP
*
heap
,
WS_URL
**
ret
,
WS_ERROR
*
error
)
HRESULT
WINAPI
WsDecodeUrl
(
const
WS_STRING
*
str
,
ULONG
flags
,
WS_HEAP
*
heap
,
WS_URL
**
ret
,
WS_ERROR
*
error
)
{
HRESULT
hr
=
WS_E_QUOTA_EXCEEDED
;
WCHAR
*
p
,
*
q
,
*
decoded
=
NULL
;
WS_HTTP_URL
*
url
=
NULL
;
ULONG
len
,
len_decoded
,
port
=
0
;
TRACE
(
"%s %08x %p %p %p
\n
"
,
str
?
debugstr_wn
(
str
->
chars
,
str
->
length
)
:
"null"
,
flags
,
heap
,
ret
,
error
);
TRACE
(
"%s %08x %p %p %p
\n
"
,
str
?
debugstr_wn
(
str
->
chars
,
str
->
length
)
:
"null"
,
flags
,
heap
,
ret
,
error
);
if
(
error
)
FIXME
(
"ignoring error parameter
\n
"
);
if
(
!
str
||
!
heap
)
return
E_INVALIDARG
;
...
...
@@ -203,7 +201,15 @@ HRESULT WINAPI WsDecodeUrl( const WS_STRING *str, ULONG flags, WS_HEAP *heap, WS
if
(
!--
len
||
*++
q
!=
'/'
)
goto
done
;
p
=
++
q
;
len
--
;
while
(
len
&&
*
q
!=
'/'
&&
*
q
!=
':'
&&
*
q
!=
'?'
&&
*
q
!=
'#'
)
{
q
++
;
len
--
;
};
if
(
*
q
==
'['
)
{
while
(
len
&&
*
q
!=
']'
)
{
q
++
;
len
--
;
};
if
(
*
q
++
!=
']'
)
goto
done
;
}
else
{
while
(
len
&&
*
q
!=
'/'
&&
*
q
!=
':'
&&
*
q
!=
'?'
&&
*
q
!=
'#'
)
{
q
++
;
len
--
;
};
}
if
(
q
==
p
)
goto
done
;
url
->
host
.
length
=
q
-
p
;
url
->
host
.
chars
=
p
;
...
...
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