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
6d996f32
Commit
6d996f32
authored
Nov 27, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Nov 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implementation for PARSE_FRIENDLY in CoInternetParseIUri.
parent
8cf81d91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
uri.c
dlls/urlmon/tests/uri.c
+5
-1
uri.c
dlls/urlmon/uri.c
+31
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
6d996f32
...
@@ -5921,7 +5921,11 @@ static const uri_parse_test uri_parse_tests[] = {
...
@@ -5921,7 +5921,11 @@ static const uri_parse_test uri_parse_tests[] = {
{
"http://google.com/test/../"
,
Uri_CREATE_NO_CANONICALIZE
,
PARSE_CANONICALIZE
,
URL_NO_META
,
"http://google.com/test/../"
,
S_OK
,
FALSE
},
{
"http://google.com/test/../"
,
Uri_CREATE_NO_CANONICALIZE
,
PARSE_CANONICALIZE
,
URL_NO_META
,
"http://google.com/test/../"
,
S_OK
,
FALSE
},
{
"http://google.com/test/../"
,
Uri_CREATE_NO_CANONICALIZE
,
PARSE_CANONICALIZE
,
0
,
"http://google.com/"
,
S_OK
,
FALSE
},
{
"http://google.com/test/../"
,
Uri_CREATE_NO_CANONICALIZE
,
PARSE_CANONICALIZE
,
0
,
"http://google.com/"
,
S_OK
,
FALSE
},
{
"zip://google.com/test/../"
,
Uri_CREATE_NO_CANONICALIZE
,
PARSE_CANONICALIZE
,
0
,
"zip://google.com/"
,
S_OK
,
FALSE
},
{
"zip://google.com/test/../"
,
Uri_CREATE_NO_CANONICALIZE
,
PARSE_CANONICALIZE
,
0
,
"zip://google.com/"
,
S_OK
,
FALSE
},
{
"file:///c:/test/../test"
,
Uri_CREATE_NO_CANONICALIZE
,
PARSE_CANONICALIZE
,
URL_DONT_SIMPLIFY
,
"file:///c:/test/../test"
,
S_OK
,
FALSE
}
{
"file:///c:/test/../test"
,
Uri_CREATE_NO_CANONICALIZE
,
PARSE_CANONICALIZE
,
URL_DONT_SIMPLIFY
,
"file:///c:/test/../test"
,
S_OK
,
FALSE
},
/* PARSE_FRIENDLY tests. */
{
"http://test@google.com/test#test"
,
0
,
PARSE_FRIENDLY
,
0
,
"http://google.com/test#test"
,
S_OK
,
FALSE
},
{
"zip://test@google.com/test"
,
0
,
PARSE_FRIENDLY
,
0
,
"zip://test@google.com/test"
,
S_OK
,
FALSE
}
};
};
static
inline
LPWSTR
a2w
(
LPCSTR
str
)
{
static
inline
LPWSTR
a2w
(
LPCSTR
str
)
{
...
...
dlls/urlmon/uri.c
View file @
6d996f32
...
@@ -6186,6 +6186,34 @@ static HRESULT parse_canonicalize(const Uri *uri, DWORD flags, LPWSTR output,
...
@@ -6186,6 +6186,34 @@ static HRESULT parse_canonicalize(const Uri *uri, DWORD flags, LPWSTR output,
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
parse_friendly
(
IUri
*
uri
,
LPWSTR
output
,
DWORD
output_len
,
DWORD
*
result_len
)
{
HRESULT
hr
;
DWORD
display_len
;
BSTR
display
;
hr
=
IUri_GetPropertyLength
(
uri
,
Uri_PROPERTY_DISPLAY_URI
,
&
display_len
,
0
);
if
(
FAILED
(
hr
))
{
*
result_len
=
0
;
return
hr
;
}
*
result_len
=
display_len
;
if
(
display_len
+
1
>
output_len
)
return
STRSAFE_E_INSUFFICIENT_BUFFER
;
hr
=
IUri_GetDisplayUri
(
uri
,
&
display
);
if
(
FAILED
(
hr
))
{
*
result_len
=
0
;
return
hr
;
}
memcpy
(
output
,
display
,
(
display_len
+
1
)
*
sizeof
(
WCHAR
));
SysFreeString
(
display
);
return
S_OK
;
}
/***********************************************************************
/***********************************************************************
* CoInternetParseIUri (urlmon.@)
* CoInternetParseIUri (urlmon.@)
*/
*/
...
@@ -6217,6 +6245,9 @@ HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD d
...
@@ -6217,6 +6245,9 @@ HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD d
}
}
hr
=
parse_canonicalize
(
uri
,
dwFlags
,
pwzResult
,
cchResult
,
pcchResult
);
hr
=
parse_canonicalize
(
uri
,
dwFlags
,
pwzResult
,
cchResult
,
pcchResult
);
break
;
break
;
case
PARSE_FRIENDLY
:
hr
=
parse_friendly
(
pIUri
,
pwzResult
,
cchResult
,
pcchResult
);
break
;
case
PARSE_SECURITY_URL
:
case
PARSE_SECURITY_URL
:
case
PARSE_MIME
:
case
PARSE_MIME
:
case
PARSE_SERVER
:
case
PARSE_SERVER
:
...
...
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