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
fe41d09d
Commit
fe41d09d
authored
Jul 06, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented functionality for retrieving the RAW_URI property of a IUri.
parent
15f36468
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
20 deletions
+67
-20
uri.c
dlls/urlmon/tests/uri.c
+12
-12
uri.c
dlls/urlmon/uri.c
+55
-8
No files found.
dlls/urlmon/tests/uri.c
View file @
fe41d09d
...
...
@@ -104,7 +104,7 @@ static const uri_properties uri_tests[] = {
{
"/"
,
S_OK
,
TRUE
},
/* PATH */
{
"/"
,
S_OK
,
TRUE
},
/* PATH_AND_QUERY */
{
""
,
S_FALSE
,
TRUE
},
/* QUERY */
{
"http://www.winehq.org/tests/../tests/../.."
,
S_OK
,
TRUE
},
/* RAW_URI */
{
"http://www.winehq.org/tests/../tests/../.."
,
S_OK
,
FALSE
},
/* RAW_URI */
{
"http"
,
S_OK
,
TRUE
},
/* SCHEME_NAME */
{
""
,
S_FALSE
,
TRUE
},
/* USER_INFO */
{
""
,
S_FALSE
,
TRUE
}
/* USER_NAME */
...
...
@@ -133,7 +133,7 @@ static const uri_properties uri_tests[] = {
{
"/tests"
,
S_OK
,
TRUE
},
{
"/tests"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"http://winehq.org/tests/.././tests"
,
S_OK
,
TRU
E
},
{
"http://winehq.org/tests/.././tests"
,
S_OK
,
FALS
E
},
{
"http"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
...
...
@@ -162,7 +162,7 @@ static const uri_properties uri_tests[] = {
{
"/"
,
S_OK
,
TRUE
},
{
"/?query=x&return=y"
,
S_OK
,
TRUE
},
{
"?query=x&return=y"
,
S_OK
,
TRUE
},
{
"HtTp://www.winehq.org/tests/..?query=x&return=y"
,
S_OK
,
TRU
E
},
{
"HtTp://www.winehq.org/tests/..?query=x&return=y"
,
S_OK
,
FALS
E
},
{
"http"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
...
...
@@ -191,7 +191,7 @@ static const uri_properties uri_tests[] = {
{
"/path/a/Forbidden'%3C%7C%3E%20Characters"
,
S_OK
,
TRUE
},
{
"/path/a/Forbidden'%3C%7C%3E%20Characters"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"hTTp://us%45r%3Ainfo@examp%4CE.com:80/path/a/b/./c/../%2E%2E/Forbidden'<|> Characters"
,
S_OK
,
TRU
E
},
{
"hTTp://us%45r%3Ainfo@examp%4CE.com:80/path/a/b/./c/../%2E%2E/Forbidden'<|> Characters"
,
S_OK
,
FALS
E
},
{
"http"
,
S_OK
,
TRUE
},
{
"usEr%3Ainfo"
,
S_OK
,
TRUE
},
{
"usEr%3Ainfo"
,
S_OK
,
TRUE
}
...
...
@@ -221,7 +221,7 @@ static const uri_properties uri_tests[] = {
{
"/dir/foo%20bar.txt"
,
S_OK
,
TRUE
},
{
"/dir/foo%20bar.txt"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://winepass:wine@ftp.winehq.org:9999/dir/foo bar.txt"
,
S_OK
,
TRU
E
},
{
"ftp://winepass:wine@ftp.winehq.org:9999/dir/foo bar.txt"
,
S_OK
,
FALS
E
},
{
"ftp"
,
S_OK
,
TRUE
},
{
"winepass:wine"
,
S_OK
,
TRUE
},
{
"winepass"
,
S_OK
,
TRUE
}
...
...
@@ -249,7 +249,7 @@ static const uri_properties uri_tests[] = {
{
"/c:/tests/foo%2520bar.mp3"
,
S_OK
,
TRUE
},
{
"/c:/tests/foo%2520bar.mp3"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"file://c:
\\
tests
\\
../tests/foo%20bar.mp3"
,
S_OK
,
TRU
E
},
{
"file://c:
\\
tests
\\
../tests/foo%20bar.mp3"
,
S_OK
,
FALS
E
},
{
"file"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
...
...
@@ -277,7 +277,7 @@ static const uri_properties uri_tests[] = {
{
"/tests/test%20file.README.txt"
,
S_OK
,
TRUE
},
{
"/tests/test%20file.README.txt"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"FILE://localhost/test dir
\\
../tests/test%20file.README.txt"
,
S_OK
,
TRU
E
},
{
"FILE://localhost/test dir
\\
../tests/test%20file.README.txt"
,
S_OK
,
FALS
E
},
{
"file"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
...
...
@@ -305,7 +305,7 @@ static const uri_properties uri_tests[] = {
{
"nothing:should:happen here"
,
S_OK
,
TRUE
},
{
"nothing:should:happen here"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"urn:nothing:should:happen here"
,
S_OK
,
TRU
E
},
{
"urn:nothing:should:happen here"
,
S_OK
,
FALS
E
},
{
"urn"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
...
...
@@ -334,7 +334,7 @@ static const uri_properties uri_tests[] = {
{
"/test%20dir/test.txt"
,
S_OK
,
TRUE
},
{
"/test%20dir/test.txt"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"http://127.0.0.1/tests/../test dir/./test.txt"
,
S_OK
,
TRU
E
},
{
"http://127.0.0.1/tests/../test dir/./test.txt"
,
S_OK
,
FALS
E
},
{
"http"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
...
...
@@ -363,7 +363,7 @@ static const uri_properties uri_tests[] = {
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]"
,
S_OK
,
TRU
E
},
{
"http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]"
,
S_OK
,
FALS
E
},
{
"http"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
...
...
@@ -392,7 +392,7 @@ static const uri_properties uri_tests[] = {
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"ftp://[::13.1.68.3]"
,
S_OK
,
TRU
E
},
{
"ftp://[::13.1.68.3]"
,
S_OK
,
FALS
E
},
{
"ftp"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
}
...
...
@@ -421,7 +421,7 @@ static const uri_properties uri_tests[] = {
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"http://[FEDC:BA98:0:0:0:0:0:3210]"
,
S_OK
,
TRU
E
},
{
"http://[FEDC:BA98:0:0:0:0:0:3210]"
,
S_OK
,
FALS
E
},
{
"http"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
...
...
dlls/urlmon/uri.c
View file @
fe41d09d
...
...
@@ -25,6 +25,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef
struct
{
const
IUriVtbl
*
lpIUriVtbl
;
LONG
ref
;
BSTR
raw_uri
;
}
Uri
;
typedef
struct
{
...
...
@@ -74,8 +76,10 @@ static ULONG WINAPI Uri_Release(IUri *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
{
SysFreeString
(
This
->
raw_uri
);
heap_free
(
This
);
}
return
ref
;
}
...
...
@@ -83,7 +87,8 @@ static ULONG WINAPI Uri_Release(IUri *iface)
static
HRESULT
WINAPI
Uri_GetPropertyBSTR
(
IUri
*
iface
,
Uri_PROPERTY
uriProp
,
BSTR
*
pbstrProperty
,
DWORD
dwFlags
)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pbstrProperty
,
dwFlags
);
HRESULT
hres
;
TRACE
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pbstrProperty
,
dwFlags
);
if
(
!
pbstrProperty
)
return
E_POINTER
;
...
...
@@ -99,13 +104,33 @@ static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BST
return
S_OK
;
}
/* Don't have support for flags yet. */
if
(
dwFlags
)
{
FIXME
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pbstrProperty
,
dwFlags
);
return
E_NOTIMPL
;
}
switch
(
uriProp
)
{
case
Uri_PROPERTY_RAW_URI
:
*
pbstrProperty
=
SysAllocString
(
This
->
raw_uri
);
if
(
!
(
*
pbstrProperty
))
hres
=
E_OUTOFMEMORY
;
else
hres
=
S_OK
;
break
;
default:
FIXME
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pbstrProperty
,
dwFlags
);
hres
=
E_NOTIMPL
;
}
return
hres
;
}
static
HRESULT
WINAPI
Uri_GetPropertyLength
(
IUri
*
iface
,
Uri_PROPERTY
uriProp
,
DWORD
*
pcchProperty
,
DWORD
dwFlags
)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pcchProperty
,
dwFlags
);
HRESULT
hres
;
TRACE
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pcchProperty
,
dwFlags
);
if
(
!
pcchProperty
)
return
E_INVALIDARG
;
...
...
@@ -114,7 +139,23 @@ static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, D
if
(
uriProp
>
Uri_PROPERTY_STRING_LAST
)
return
E_INVALIDARG
;
/* Don't have support for flags yet. */
if
(
dwFlags
)
{
FIXME
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pcchProperty
,
dwFlags
);
return
E_NOTIMPL
;
}
switch
(
uriProp
)
{
case
Uri_PROPERTY_RAW_URI
:
*
pcchProperty
=
SysStringLen
(
This
->
raw_uri
);
hres
=
S_OK
;
break
;
default:
FIXME
(
"(%p)->(%d %p %x)
\n
"
,
This
,
uriProp
,
pcchProperty
,
dwFlags
);
hres
=
E_NOTIMPL
;
}
return
hres
;
}
static
HRESULT
WINAPI
Uri_GetPropertyDWORD
(
IUri
*
iface
,
Uri_PROPERTY
uriProp
,
DWORD
*
pcchProperty
,
DWORD
dwFlags
)
...
...
@@ -278,12 +319,10 @@ static HRESULT WINAPI Uri_GetQuery(IUri *iface, BSTR *pstrQuery)
static
HRESULT
WINAPI
Uri_GetRawUri
(
IUri
*
iface
,
BSTR
*
pstrRawUri
)
{
Uri
*
This
=
URI_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pstrRawUri
);
if
(
!
pstrRawUri
)
return
E_POINTER
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pstrRawUri
);
return
E_NOTIMPL
;
/* Just forward the call to GetPropertyBSTR. */
return
Uri_GetPropertyBSTR
(
iface
,
Uri_PROPERTY_RAW_URI
,
pstrRawUri
,
0
);
}
static
HRESULT
WINAPI
Uri_GetSchemeName
(
IUri
*
iface
,
BSTR
*
pstrSchemeName
)
...
...
@@ -454,6 +493,14 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU
ret
->
lpIUriVtbl
=
&
UriVtbl
;
ret
->
ref
=
1
;
/* Create a copy of pwzURI and store it as the raw_uri. */
ret
->
raw_uri
=
SysAllocString
(
pwzURI
);
if
(
!
ret
->
raw_uri
)
{
heap_free
(
ret
);
return
E_OUTOFMEMORY
;
}
*
ppURI
=
URI
(
ret
);
return
S_OK
;
}
...
...
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