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
152a1efd
Commit
152a1efd
authored
Jun 17, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Jul 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented IUri_GetUserInfo.
parent
520902cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
39 deletions
+51
-39
uri.c
dlls/urlmon/tests/uri.c
+32
-32
uri.c
dlls/urlmon/uri.c
+19
-7
No files found.
dlls/urlmon/tests/uri.c
View file @
152a1efd
...
...
@@ -106,7 +106,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
/* QUERY */
{
"http://www.winehq.org/tests/../tests/../.."
,
S_OK
,
FALSE
},
/* RAW_URI */
{
"http"
,
S_OK
,
FALSE
},
/* SCHEME_NAME */
{
""
,
S_FALSE
,
TRUE
},
/* USER_INFO */
{
""
,
S_FALSE
,
FALSE
},
/* USER_INFO */
{
""
,
S_FALSE
,
TRUE
}
/* USER_NAME */
},
{
...
...
@@ -135,7 +135,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"http://winehq.org/tests/.././tests"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -164,7 +164,7 @@ static const uri_properties uri_tests[] = {
{
"?query=x&return=y"
,
S_OK
,
TRUE
},
{
"HtTp://www.winehq.org/tests/..?query=x&return=y"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -193,7 +193,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"hTTp://us%45r%3Ainfo@examp%4CE.com:80/path/a/b/./c/../%2E%2E/Forbidden'<|> Characters"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
"usEr%3Ainfo"
,
S_OK
,
TRU
E
},
{
"usEr%3Ainfo"
,
S_OK
,
FALS
E
},
{
"usEr%3Ainfo"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -223,7 +223,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://winepass:wine@ftp.winehq.org:9999/dir/foo bar.txt"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"winepass:wine"
,
S_OK
,
TRU
E
},
{
"winepass:wine"
,
S_OK
,
FALS
E
},
{
"winepass"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -251,7 +251,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"file://c:
\\
tests
\\
../tests/foo%20bar.mp3"
,
S_OK
,
FALSE
},
{
"file"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -279,7 +279,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"FILE://localhost/test dir
\\
../tests/test%20file.README.txt"
,
S_OK
,
FALSE
},
{
"file"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -307,7 +307,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"urn:nothing:should:happen here"
,
S_OK
,
FALSE
},
{
"urn"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -336,7 +336,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"http://127.0.0.1/tests/../test dir/./test.txt"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -365,7 +365,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -394,7 +394,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://[::13.1.68.3]"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -423,7 +423,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"http://[FEDC:BA98:0:0:0:0:0:3210]"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
},
},
{
...
...
@@ -452,7 +452,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"1234://www.winehq.org"
,
S_OK
,
FALSE
},
{
"1234"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -615,7 +615,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"C:/test/test.mp3"
,
S_OK
,
FALSE
},
{
"file"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -645,7 +645,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"
\\\\
Server/test.mp3"
,
S_OK
,
FALSE
},
{
"file"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -674,7 +674,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"www.winehq.org/test"
,
S_OK
,
FALSE
},
{
"*"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -704,7 +704,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"*:www.winehq.org/test"
,
S_OK
,
FALSE
},
{
"*"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -786,7 +786,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"/../some dir/test.ext"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -814,7 +814,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"//implicit/wildcard/uri scheme"
,
S_OK
,
FALSE
},
{
"*"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
},
},
{
...
...
@@ -844,7 +844,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"zip://google.com"
,
S_OK
,
FALSE
},
{
"zip"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -875,7 +875,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://user:pass:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"user:pass:word"
,
S_OK
,
TRU
E
},
{
"user:pass:word"
,
S_OK
,
FALS
E
},
{
"user"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -906,7 +906,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://w%49%4Ee:PA%53%53@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"wINe:PASS"
,
S_OK
,
TRU
E
},
{
"wINe:PASS"
,
S_OK
,
FALS
E
},
{
"wINe"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -937,7 +937,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://w%5D%5Be:PA%7B%7D@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"w%5D%5Be:PA%7B%7D"
,
S_OK
,
TRU
E
},
{
"w%5D%5Be:PA%7B%7D"
,
S_OK
,
FALS
E
},
{
"w%5D%5Be"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -968,7 +968,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://empty:@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"empty:"
,
S_OK
,
TRU
E
},
{
"empty:"
,
S_OK
,
FALS
E
},
{
"empty"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -999,7 +999,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://
\"
\"
weird@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"%22%20%22weird"
,
S_OK
,
TRU
E
},
{
"%22%20%22weird"
,
S_OK
,
FALS
E
},
{
"%22%20%22weird"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -1030,7 +1030,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://
\"
\"
weird@ftp.google.com/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"
\"
\"
weird"
,
S_OK
,
TRU
E
},
{
"
\"
\"
weird"
,
S_OK
,
FALS
E
},
{
"
\"
\"
weird"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -1060,7 +1060,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"zip://%xy:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"zip"
,
S_OK
,
FALSE
},
{
"%xy:word"
,
S_OK
,
TRU
E
},
{
"%xy:word"
,
S_OK
,
FALS
E
},
{
"%xy"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -1092,7 +1092,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"zip://%2E:%52%53ord@winehq.org/"
,
S_OK
,
FALSE
},
{
"zip"
,
S_OK
,
FALSE
},
{
"%2E:%52%53ord"
,
S_OK
,
TRU
E
},
{
"%2E:%52%53ord"
,
S_OK
,
FALS
E
},
{
"%2E"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -1122,7 +1122,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://[](),'test':word@winehq.org/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
"[](),'test':word"
,
S_OK
,
TRU
E
},
{
"[](),'test':word"
,
S_OK
,
FALS
E
},
{
"[](),'test'"
,
S_OK
,
TRUE
}
},
{
...
...
@@ -1151,7 +1151,7 @@ static const uri_properties uri_tests[] = {
{
"?:word@winehq.org/"
,
S_OK
,
TRUE
},
{
"ftp://test?:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -1180,7 +1180,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://test#:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"ftp"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
TRU
E
},
{
""
,
S_FALSE
,
FALS
E
},
{
""
,
S_FALSE
,
TRUE
}
},
{
...
...
@@ -1210,7 +1210,7 @@ static const uri_properties uri_tests[] = {
{
""
,
S_FALSE
,
TRUE
},
{
"zip://test
\\
:word@winehq.org/"
,
S_OK
,
FALSE
},
{
"zip"
,
S_OK
,
FALSE
},
{
"test
\\
:word"
,
S_OK
,
TRU
E
},
{
"test
\\
:word"
,
S_OK
,
FALS
E
},
{
"test
\\
"
,
S_OK
,
TRUE
}
},
{
...
...
dlls/urlmon/uri.c
View file @
152a1efd
...
...
@@ -880,6 +880,19 @@ static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BST
hres
=
E_OUTOFMEMORY
;
break
;
case
Uri_PROPERTY_USER_INFO
:
if
(
This
->
userinfo_start
>
-
1
)
{
*
pbstrProperty
=
SysAllocStringLen
(
This
->
canon_uri
+
This
->
userinfo_start
,
This
->
userinfo_len
);
hres
=
S_OK
;
}
else
{
*
pbstrProperty
=
SysAllocStringLen
(
NULL
,
0
);
hres
=
S_FALSE
;
}
if
(
!
(
*
pbstrProperty
))
hres
=
E_OUTOFMEMORY
;
break
;
default:
FIXME
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pbstrProperty
,
dwFlags
);
hres
=
E_NOTIMPL
;
...
...
@@ -916,6 +929,10 @@ static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, D
*
pcchProperty
=
This
->
scheme_len
;
hres
=
(
This
->
scheme_start
>
-
1
)
?
S_OK
:
S_FALSE
;
break
;
case
Uri_PROPERTY_USER_INFO
:
*
pcchProperty
=
This
->
userinfo_len
;
hres
=
(
This
->
userinfo_start
>
-
1
)
?
S_OK
:
S_FALSE
;
break
;
default:
FIXME
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pcchProperty
,
dwFlags
);
hres
=
E_NOTIMPL
;
...
...
@@ -1112,13 +1129,8 @@ static HRESULT WINAPI Uri_GetSchemeName(IUri *iface, BSTR *pstrSchemeName)
static
HRESULT
WINAPI
Uri_GetUserInfo
(
IUri
*
iface
,
BSTR
*
pstrUserInfo
)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrUserInfo
);
if
(
!
pstrUserInfo
)
return
E_POINTER
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pstrUserInfo
);
return
Uri_GetPropertyBSTR
(
iface
,
Uri_PROPERTY_USER_INFO
,
pstrUserInfo
,
0
);
}
static
HRESULT
WINAPI
Uri_GetUserName
(
IUri
*
iface
,
BSTR
*
pstrUserName
)
...
...
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