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
b3084d55
Commit
b3084d55
authored
Sep 12, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added PARSE_SECURITY_URL action implementation.
parent
90215e81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
4 deletions
+33
-4
internet.c
dlls/urlmon/internet.c
+20
-0
misc.c
dlls/urlmon/tests/misc.c
+13
-4
No files found.
dlls/urlmon/internet.c
View file @
b3084d55
...
...
@@ -108,6 +108,24 @@ static IInternetProtocolInfo *get_protocol_info(LPCWSTR url)
return
ret
;
}
static
HRESULT
parse_security_url
(
LPCWSTR
url
,
DWORD
flags
,
LPWSTR
result
,
DWORD
size
,
DWORD
*
rsize
)
{
IInternetProtocolInfo
*
protocol_info
;
HRESULT
hres
;
TRACE
(
"(%s %08lx %p %ld %p)
\n
"
,
debugstr_w
(
url
),
flags
,
result
,
size
,
rsize
);
protocol_info
=
get_protocol_info
(
url
);
if
(
protocol_info
)
{
hres
=
IInternetProtocolInfo_ParseUrl
(
protocol_info
,
url
,
PARSE_SECURITY_URL
,
flags
,
result
,
size
,
rsize
,
0
);
return
hres
;
}
return
E_FAIL
;
}
static
HRESULT
parse_encode
(
LPCWSTR
url
,
DWORD
flags
,
LPWSTR
result
,
DWORD
size
,
DWORD
*
rsize
)
{
IInternetProtocolInfo
*
protocol_info
;
...
...
@@ -166,6 +184,8 @@ HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD
WARN
(
"dwReserved = %ld
\n
"
,
dwReserved
);
switch
(
ParseAction
)
{
case
PARSE_SECURITY_URL
:
return
parse_security_url
(
pwzUrl
,
dwFlags
,
pszResult
,
cchResult
,
pcchResult
);
case
PARSE_ENCODE
:
return
parse_encode
(
pwzUrl
,
dwFlags
,
pszResult
,
cchResult
,
pcchResult
);
case
PARSE_PATH_FROM_URL
:
...
...
dlls/urlmon/tests/misc.c
View file @
b3084d55
...
...
@@ -208,6 +208,8 @@ static const WCHAR url2[] = {'i','n','d','e','x','.','h','t','m',0};
static
const
WCHAR
url3
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'c'
,
':'
,
'\\'
,
'I'
,
'n'
,
'd'
,
'e'
,
'x'
,
'.'
,
'h'
,
't'
,
'm'
,
0
};
static
const
WCHAR
url4
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
's'
,
'o'
,
'm'
,
'e'
,
'%'
,
'2'
,
'0'
,
'f'
,
'i'
,
'l'
,
'e'
,
'%'
,
'2'
,
'E'
,
'j'
,
'p'
,
'g'
,
0
};
static
const
WCHAR
url5
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'w'
,
'w'
,
'w'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
0
};
static
const
WCHAR
url4e
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
's'
,
'o'
,
'm'
,
'e'
,
' '
,
'f'
,
'i'
,
'l'
,
'e'
,
'.'
,
'j'
,
'p'
,
'g'
,
0
};
...
...
@@ -221,6 +223,7 @@ static const WCHAR wszEmpty[] = {0};
struct
parse_test
{
LPCWSTR
url
;
HRESULT
secur_hres
;
LPCWSTR
encoded_url
;
HRESULT
path_hres
;
LPCWSTR
path
;
...
...
@@ -228,10 +231,10 @@ struct parse_test {
};
static
const
struct
parse_test
parse_tests
[]
=
{
{
url1
,
url1
,
E_INVALIDARG
,
NULL
,
wszRes
},
{
url2
,
url2
,
E_INVALIDARG
,
NULL
,
wszEmpty
},
{
url3
,
url3
,
S_OK
,
path3
,
wszFile
},
{
url4
,
url4e
,
S_OK
,
path4
,
wszFile
}
{
url1
,
S_OK
,
url1
,
E_INVALIDARG
,
NULL
,
wszRes
},
{
url2
,
E_FAIL
,
url2
,
E_INVALIDARG
,
NULL
,
wszEmpty
},
{
url3
,
E_FAIL
,
url3
,
S_OK
,
path3
,
wszFile
},
{
url4
,
E_FAIL
,
url4e
,
S_OK
,
path4
,
wszFile
}
};
static
void
test_CoInternetParseUrl
(
void
)
...
...
@@ -249,6 +252,12 @@ static void test_CoInternetParseUrl(void)
for
(
i
=
0
;
i
<
sizeof
(
parse_tests
)
/
sizeof
(
parse_tests
[
0
]);
i
++
)
{
memset
(
buf
,
0xf0
,
sizeof
(
buf
));
hres
=
CoInternetParseUrl
(
parse_tests
[
i
].
url
,
PARSE_SECURITY_URL
,
0
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
),
&
size
,
0
);
ok
(
hres
==
parse_tests
[
i
].
secur_hres
,
"[%d] security url failed: %08lx, expected %08lx
\n
"
,
i
,
hres
,
parse_tests
[
i
].
secur_hres
);
memset
(
buf
,
0xf0
,
sizeof
(
buf
));
hres
=
CoInternetParseUrl
(
parse_tests
[
i
].
url
,
PARSE_ENCODE
,
0
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
),
&
size
,
0
);
ok
(
hres
==
S_OK
,
"[%d] encoding failed: %08lx
\n
"
,
i
,
hres
);
...
...
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