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
0a4e8541
Commit
0a4e8541
authored
Sep 05, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Sep 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Implemented IUriBuilder_{Get/Set}Password.
parent
cf1d55c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
15 deletions
+79
-15
uri.c
dlls/urlmon/tests/uri.c
+65
-1
uri.c
dlls/urlmon/uri.c
+14
-14
No files found.
dlls/urlmon/tests/uri.c
View file @
0a4e8541
...
...
@@ -4279,7 +4279,7 @@ static const uri_builder_test uri_builder_tests[] = {
{
"http://google.com/"
,
0
,
S_OK
,
FALSE
,
{
{
TRUE
,
"#fragment"
,
NULL
,
Uri_PROPERTY_FRAGMENT
,
S_OK
,
FALSE
},
{
TRUE
,
"password"
,
NULL
,
Uri_PROPERTY_PASSWORD
,
S_OK
,
TRU
E
},
{
TRUE
,
"password"
,
NULL
,
Uri_PROPERTY_PASSWORD
,
S_OK
,
FALS
E
},
{
TRUE
,
"?query=x"
,
NULL
,
Uri_PROPERTY_QUERY
,
S_OK
,
TRUE
},
{
TRUE
,
"username"
,
NULL
,
Uri_PROPERTY_USER_NAME
,
S_OK
,
TRUE
}
},
...
...
@@ -4440,6 +4440,70 @@ static const uri_builder_test uri_builder_tests[] = {
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
{
"http://google.com/"
,
0
,
S_OK
,
FALSE
,
{
{
TRUE
,
":password"
,
NULL
,
Uri_PROPERTY_PASSWORD
,
S_OK
,
FALSE
}
},
{
FALSE
},
0
,
S_OK
,
TRUE
,
0
,
S_OK
,
TRUE
,
0
,
0
,
0
,
S_OK
,
TRUE
,
{
{
"http://::password@google.com/"
,
S_OK
},
{
"::password@google.com"
,
S_OK
},
{
"http://google.com/"
,
S_OK
},
{
"google.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"google.com"
,
S_OK
},
{
":password"
,
S_OK
},
{
"/"
,
S_OK
},
{
"/"
,
S_OK
},
{
""
,
S_FALSE
},
{
"http://::password@google.com/"
,
S_OK
},
{
"http"
,
S_OK
},
{
"::password"
,
S_OK
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
},
{
80
,
S_OK
},
{
URL_SCHEME_HTTP
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
{
"test/test"
,
Uri_CREATE_ALLOW_RELATIVE
,
S_OK
,
FALSE
,
{
{
TRUE
,
"password"
,
NULL
,
Uri_PROPERTY_PASSWORD
,
S_OK
,
FALSE
}
},
{
FALSE
},
Uri_CREATE_ALLOW_RELATIVE
,
S_OK
,
TRUE
,
0
,
S_OK
,
TRUE
,
Uri_CREATE_ALLOW_RELATIVE
,
0
,
0
,
S_OK
,
TRUE
,
{
{
":password@test/test"
,
S_OK
},
{
":password@"
,
S_OK
},
{
":password@test/test"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"password"
,
S_OK
},
{
"test/test"
,
S_OK
},
{
"test/test"
,
S_OK
},
{
""
,
S_FALSE
},
{
":password@test/test"
,
S_OK
},
{
""
,
S_FALSE
},
{
":password"
,
S_OK
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
},
{
0
,
S_FALSE
},
{
URL_SCHEME_UNKNOWN
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
};
...
...
dlls/urlmon/uri.c
View file @
0a4e8541
...
...
@@ -85,6 +85,9 @@ typedef struct {
WCHAR
*
host
;
DWORD
host_len
;
WCHAR
*
password
;
DWORD
password_len
;
}
UriBuilder
;
typedef
struct
{
...
...
@@ -4314,6 +4317,7 @@ static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
if
(
This
->
uri
)
IUri_Release
(
URI
(
This
->
uri
));
heap_free
(
This
->
fragment
);
heap_free
(
This
->
host
);
heap_free
(
This
->
password
);
heap_free
(
This
);
}
...
...
@@ -4462,19 +4466,13 @@ static HRESULT WINAPI UriBuilder_GetPassword(IUriBuilder *iface, DWORD *pcchPass
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
TRACE
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchPassword
,
ppwzPassword
);
if
(
!
pcchPassword
)
{
if
(
ppwzPassword
)
*
ppwzPassword
=
NULL
;
return
E_POINTER
;
}
if
(
!
ppwzPassword
)
{
*
pcchPassword
=
0
;
return
E_POINTER
;
if
(
!
This
->
uri
||
This
->
uri
->
userinfo_split
==
-
1
||
This
->
modified_props
&
Uri_HAS_PASSWORD
)
return
get_builder_component
(
&
This
->
password
,
&
This
->
password_len
,
NULL
,
0
,
ppwzPassword
,
pcchPassword
);
else
{
const
WCHAR
*
start
=
This
->
uri
->
canon_uri
+
This
->
uri
->
userinfo_start
+
This
->
uri
->
userinfo_split
+
1
;
DWORD
len
=
This
->
uri
->
userinfo_len
-
This
->
uri
->
userinfo_split
-
1
;
return
get_builder_component
(
&
This
->
password
,
&
This
->
password_len
,
start
,
len
,
ppwzPassword
,
pcchPassword
);
}
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
pcchPassword
,
ppwzPassword
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
UriBuilder_GetPath
(
IUriBuilder
*
iface
,
DWORD
*
pcchPath
,
LPCWSTR
*
ppwzPath
)
...
...
@@ -4598,8 +4596,10 @@ static HRESULT WINAPI UriBuilder_SetHost(IUriBuilder *iface, LPCWSTR pwzNewValue
static
HRESULT
WINAPI
UriBuilder_SetPassword
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
{
UriBuilder
*
This
=
URIBUILDER_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzNewValue
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
pwzNewValue
));
This
->
modified_props
|=
Uri_HAS_PASSWORD
;
return
set_builder_component
(
&
This
->
password
,
&
This
->
password_len
,
pwzNewValue
,
0
);
}
static
HRESULT
WINAPI
UriBuilder_SetPath
(
IUriBuilder
*
iface
,
LPCWSTR
pwzNewValue
)
...
...
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