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
6a459d11
Commit
6a459d11
authored
Nov 28, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Nov 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented PARSE_DOCUMENT for CoInternetParseIUri.
parent
81c274a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
1 deletion
+51
-1
uri.c
dlls/urlmon/tests/uri.c
+9
-1
uri.c
dlls/urlmon/uri.c
+42
-0
No files found.
dlls/urlmon/tests/uri.c
View file @
6a459d11
...
...
@@ -5933,7 +5933,15 @@ static const uri_parse_test uri_parse_tests[] = {
{
"zip://google.com/"
,
0
,
PARSE_ROOTDOCUMENT
,
0
,
""
,
S_OK
,
FALSE
},
{
"file:///c:/testing/"
,
0
,
PARSE_ROOTDOCUMENT
,
0
,
""
,
S_OK
,
FALSE
},
{
"file://server/test"
,
0
,
PARSE_ROOTDOCUMENT
,
0
,
""
,
S_OK
,
FALSE
},
{
"zip:test/test"
,
0
,
PARSE_ROOTDOCUMENT
,
0
,
""
,
S_OK
,
FALSE
}
{
"zip:test/test"
,
0
,
PARSE_ROOTDOCUMENT
,
0
,
""
,
S_OK
,
FALSE
},
/* PARSE_DOCUMENT tests. */
{
"http://test@google.com/test?query#frag"
,
0
,
PARSE_DOCUMENT
,
0
,
"http://test@google.com/test?query"
,
S_OK
,
FALSE
},
{
"http:testing#frag"
,
0
,
PARSE_DOCUMENT
,
0
,
""
,
S_OK
,
FALSE
},
{
"file:///c:/test#frag"
,
0
,
PARSE_DOCUMENT
,
0
,
""
,
S_OK
,
FALSE
},
{
"zip://google.com/#frag"
,
0
,
PARSE_DOCUMENT
,
0
,
""
,
S_OK
,
FALSE
},
{
"zip:test#frag"
,
0
,
PARSE_DOCUMENT
,
0
,
""
,
S_OK
,
FALSE
},
{
"testing#frag"
,
Uri_CREATE_ALLOW_RELATIVE
,
PARSE_DOCUMENT
,
0
,
""
,
S_OK
,
FALSE
}
};
static
inline
LPWSTR
a2w
(
LPCSTR
str
)
{
...
...
dlls/urlmon/uri.c
View file @
6a459d11
...
...
@@ -6265,6 +6265,39 @@ static HRESULT parse_rootdocument(const Uri *uri, LPWSTR output, DWORD output_le
return
S_OK
;
}
static
HRESULT
parse_document
(
const
Uri
*
uri
,
LPWSTR
output
,
DWORD
output_len
,
DWORD
*
result_len
)
{
DWORD
len
=
0
;
/* It has to be a known scheme type, but, it can't be a file
* scheme. It also has to hierarchical.
*/
if
(
uri
->
scheme_type
==
URL_SCHEME_UNKNOWN
||
uri
->
scheme_type
==
URL_SCHEME_FILE
||
uri
->
authority_start
==
-
1
)
{
*
result_len
=
0
;
if
(
output_len
<
1
)
return
STRSAFE_E_INSUFFICIENT_BUFFER
;
output
[
0
]
=
0
;
return
S_OK
;
}
if
(
uri
->
fragment_start
>
-
1
)
len
=
uri
->
fragment_start
;
else
len
=
uri
->
canon_len
;
*
result_len
=
len
;
if
(
len
+
1
>
output_len
)
return
STRSAFE_E_INSUFFICIENT_BUFFER
;
memcpy
(
output
,
uri
->
canon_uri
,
len
*
sizeof
(
WCHAR
));
output
[
len
]
=
0
;
return
S_OK
;
}
/***********************************************************************
* CoInternetParseIUri (urlmon.@)
*/
...
...
@@ -6308,6 +6341,15 @@ HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD d
}
hr
=
parse_rootdocument
(
uri
,
pwzResult
,
cchResult
,
pcchResult
);
break
;
case
PARSE_DOCUMENT
:
if
(
!
(
uri
=
get_uri_obj
(
pIUri
)))
{
*
pcchResult
=
0
;
FIXME
(
"(%p %d %x %p %d %p %x) Unknown IUri's not supported for this action.
\n
"
,
pIUri
,
ParseAction
,
dwFlags
,
pwzResult
,
cchResult
,
pcchResult
,
(
DWORD
)
dwReserved
);
return
E_NOTIMPL
;
}
hr
=
parse_document
(
uri
,
pwzResult
,
cchResult
,
pcchResult
);
break
;
case
PARSE_SECURITY_URL
:
case
PARSE_MIME
:
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