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
150f79b5
Commit
150f79b5
authored
Jun 23, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Query for IHtmlNegotiate[2] interfaces when needed.
parent
c32925ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
60 deletions
+37
-60
bindctx.c
dlls/urlmon/bindctx.c
+37
-54
url.c
dlls/urlmon/tests/url.c
+0
-6
No files found.
dlls/urlmon/bindctx.c
View file @
150f79b5
...
...
@@ -37,13 +37,6 @@ typedef struct {
IBindStatusCallback
*
callback
;
IServiceProvider
*
serv_prov
;
IHttpNegotiate
*
http_negotiate
;
BOOL
init_http_negotiate
;
IHttpNegotiate2
*
http_negotiate2
;
BOOL
init_http_negotiate2
;
IAuthenticate
*
authenticate
;
BOOL
init_authenticate
;
}
BindStatusCallback
;
#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl)
...
...
@@ -51,6 +44,18 @@ typedef struct {
#define HTTPNEG2(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl)
#define AUTHENTICATE(x) ((IAuthenticate*) &(x)->lpAuthenticateVtbl)
static
void
*
get_callback_iface
(
BindStatusCallback
*
This
,
REFIID
riid
)
{
void
*
ret
;
HRESULT
hres
;
hres
=
IBindStatusCallback_QueryInterface
(
This
->
callback
,
riid
,
(
void
**
)
&
ret
);
if
(
FAILED
(
hres
)
&&
This
->
serv_prov
)
IServiceProvider_QueryService
(
This
->
serv_prov
,
riid
,
riid
,
&
ret
);
return
ret
;
}
#define STATUSCLB_THIS(iface) DEFINE_THIS(BindStatusCallback, BindStatusCallback, iface)
static
HRESULT
WINAPI
BindStatusCallback_QueryInterface
(
IBindStatusCallback
*
iface
,
...
...
@@ -112,12 +117,6 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
if
(
!
ref
)
{
if
(
This
->
serv_prov
)
IServiceProvider_Release
(
This
->
serv_prov
);
if
(
This
->
http_negotiate
)
IHttpNegotiate_Release
(
This
->
http_negotiate
);
if
(
This
->
http_negotiate2
)
IHttpNegotiate2_Release
(
This
->
http_negotiate2
);
if
(
This
->
authenticate
)
IAuthenticate_Release
(
This
->
authenticate
);
IBindStatusCallback_Release
(
This
->
callback
);
heap_free
(
This
);
}
...
...
@@ -250,46 +249,16 @@ static HRESULT WINAPI BSCServiceProvider_QueryService(IServiceProvider *iface,
if
(
IsEqualGUID
(
&
IID_IHttpNegotiate
,
guidService
))
{
TRACE
(
"(%p)->(IID_IHttpNegotiate %s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
This
->
init_http_negotiate
)
{
This
->
init_http_negotiate
=
TRUE
;
hres
=
IBindStatusCallback_QueryInterface
(
This
->
callback
,
&
IID_IHttpNegotiate
,
(
void
**
)
&
This
->
http_negotiate
);
if
(
FAILED
(
hres
)
&&
This
->
serv_prov
)
IServiceProvider_QueryService
(
This
->
serv_prov
,
&
IID_IHttpNegotiate
,
&
IID_IHttpNegotiate
,
(
void
**
)
&
This
->
http_negotiate
);
}
return
IBindStatusCallback_QueryInterface
(
STATUSCLB
(
This
),
riid
,
ppv
);
}
if
(
IsEqualGUID
(
&
IID_IHttpNegotiate2
,
guidService
))
{
TRACE
(
"(%p)->(IID_IHttpNegotiate2 %s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
This
->
init_http_negotiate2
)
{
This
->
init_http_negotiate2
=
TRUE
;
hres
=
IBindStatusCallback_QueryInterface
(
This
->
callback
,
&
IID_IHttpNegotiate2
,
(
void
**
)
&
This
->
http_negotiate2
);
if
(
FAILED
(
hres
)
&&
This
->
serv_prov
)
IServiceProvider_QueryService
(
This
->
serv_prov
,
&
IID_IHttpNegotiate2
,
&
IID_IHttpNegotiate2
,
(
void
**
)
&
This
->
http_negotiate2
);
}
return
IBindStatusCallback_QueryInterface
(
STATUSCLB
(
This
),
riid
,
ppv
);
}
if
(
IsEqualGUID
(
&
IID_IAuthenticate
,
guidService
))
{
TRACE
(
"(%p)->(IID_IAuthenticate %s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
This
->
init_authenticate
)
{
This
->
init_authenticate
=
TRUE
;
hres
=
IBindStatusCallback_QueryInterface
(
This
->
callback
,
&
IID_IAuthenticate
,
(
void
**
)
&
This
->
authenticate
);
if
(
FAILED
(
hres
)
&&
This
->
serv_prov
)
IServiceProvider_QueryService
(
This
->
serv_prov
,
&
IID_IAuthenticate
,
&
IID_IAuthenticate
,
(
void
**
)
&
This
->
authenticate
);
}
return
IBindStatusCallback_QueryInterface
(
STATUSCLB
(
This
),
riid
,
ppv
);
}
...
...
@@ -342,17 +311,22 @@ static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate2 *ifa
LPCWSTR
szURL
,
LPCWSTR
szHeaders
,
DWORD
dwReserved
,
LPWSTR
*
pszAdditionalHeaders
)
{
BindStatusCallback
*
This
=
HTTPNEG2_THIS
(
iface
);
IHttpNegotiate
*
http_negotiate
;
HRESULT
hres
=
S_OK
;
TRACE
(
"(%p)->(%s %s %d %p)
\n
"
,
This
,
debugstr_w
(
szURL
),
debugstr_w
(
szHeaders
),
dwReserved
,
pszAdditionalHeaders
);
*
pszAdditionalHeaders
=
NULL
;
if
(
!
This
->
http_negotiate
)
return
S_OK
;
http_negotiate
=
get_callback_iface
(
This
,
&
IID_IHttpNegotiate
);
if
(
http_negotiate
)
{
hres
=
IHttpNegotiate_BeginningTransaction
(
http_negotiate
,
szURL
,
szHeaders
,
dwReserved
,
pszAdditionalHeaders
);
IHttpNegotiate_Release
(
http_negotiate
);
}
return
IHttpNegotiate_BeginningTransaction
(
This
->
http_negotiate
,
szURL
,
szHeaders
,
dwReserved
,
pszAdditionalHeaders
);
return
hres
;
}
static
HRESULT
WINAPI
BSCHttpNegotiate_OnResponse
(
IHttpNegotiate2
*
iface
,
DWORD
dwResponseCode
,
...
...
@@ -361,14 +335,18 @@ static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD
{
BindStatusCallback
*
This
=
HTTPNEG2_THIS
(
iface
);
LPWSTR
additional_headers
=
NULL
;
IHttpNegotiate
*
http_negotiate
;
HRESULT
hres
=
S_OK
;
TRACE
(
"(%p)->(%d %s %s %p)
\n
"
,
This
,
dwResponseCode
,
debugstr_w
(
szResponseHeaders
),
debugstr_w
(
szRequestHeaders
),
pszAdditionalRequestHeaders
);
if
(
This
->
http_negotiate
)
hres
=
IHttpNegotiate_OnResponse
(
This
->
http_negotiate
,
dwResponseCode
,
szResponseHeaders
,
szRequestHeaders
,
&
additional_headers
);
http_negotiate
=
get_callback_iface
(
This
,
&
IID_IHttpNegotiate
);
if
(
http_negotiate
)
{
hres
=
IHttpNegotiate_OnResponse
(
http_negotiate
,
dwResponseCode
,
szResponseHeaders
,
szRequestHeaders
,
&
additional_headers
);
IHttpNegotiate_Release
(
http_negotiate
);
}
if
(
pszAdditionalRequestHeaders
)
*
pszAdditionalRequestHeaders
=
additional_headers
;
...
...
@@ -382,14 +360,19 @@ static HRESULT WINAPI BSCHttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface,
BYTE
*
pbSecurityId
,
DWORD
*
pcbSecurityId
,
DWORD_PTR
dwReserved
)
{
BindStatusCallback
*
This
=
HTTPNEG2_THIS
(
iface
);
IHttpNegotiate2
*
http_negotiate2
;
HRESULT
hres
=
E_FAIL
;
TRACE
(
"(%p)->(%p %p %ld)
\n
"
,
This
,
pbSecurityId
,
pcbSecurityId
,
dwReserved
);
if
(
!
This
->
http_negotiate2
)
return
E_NOTIMPL
;
http_negotiate2
=
get_callback_iface
(
This
,
&
IID_IHttpNegotiate2
);
if
(
http_negotiate2
)
{
hres
=
IHttpNegotiate2_GetRootSecurityId
(
http_negotiate2
,
pbSecurityId
,
pcbSecurityId
,
dwReserved
);
IHttpNegotiate2_Release
(
http_negotiate2
);
}
return
IHttpNegotiate2_GetRootSecurityId
(
This
->
http_negotiate2
,
pbSecurityId
,
pcbSecurityId
,
dwReserved
);
return
hres
;
}
#undef HTTPNEG2_THIS
...
...
dlls/urlmon/tests/url.c
View file @
150f79b5
...
...
@@ -601,7 +601,6 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
SET_EXPECT
(
QueryInterface_IHttpNegotiate
);
hres
=
IHttpNegotiate_BeginningTransaction
(
http_negotiate
,
urls
[
test_protocol
],
NULL
,
0
,
&
additional_headers
);
todo_wine
CHECK_CALLED_BROKEN
(
QueryInterface_IHttpNegotiate
);
CHECK_CALLED
(
BeginningTransaction
);
IHttpNegotiate_Release
(
http_negotiate
);
...
...
@@ -618,7 +617,6 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
SET_EXPECT
(
QueryInterface_IHttpNegotiate2
);
SET_EXPECT
(
GetRootSecurityId
);
hres
=
IHttpNegotiate2_GetRootSecurityId
(
http_negotiate2
,
sec_id
,
&
size
,
0
);
todo_wine
CHECK_CALLED_BROKEN
(
QueryInterface_IHttpNegotiate2
);
CHECK_CALLED
(
GetRootSecurityId
);
IHttpNegotiate2_Release
(
http_negotiate2
);
...
...
@@ -773,7 +771,6 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface,
SET_EXPECT
(
QueryInterface_IHttpNegotiate
);
SET_EXPECT
(
OnResponse
);
hres
=
IHttpNegotiate_OnResponse
(
http_negotiate
,
200
,
header
,
NULL
,
NULL
);
todo_wine
CHECK_CALLED_BROKEN
(
QueryInterface_IHttpNegotiate
);
CHECK_CALLED
(
OnResponse
);
IHttpNegotiate_Release
(
http_negotiate
);
...
...
@@ -1951,7 +1948,6 @@ static BOOL test_bscholder(IBindStatusCallback *holder)
SET_EXPECT
(
QueryInterface_IHttpNegotiate
);
SET_EXPECT
(
BeginningTransaction
);
hres
=
IHttpNegotiate_BeginningTransaction
(
http_negotiate_serv
,
urls
[
test_protocol
],
emptyW
,
0
,
&
wstr
);
todo_wine
CHECK_CALLED_BROKEN
(
QueryInterface_IHttpNegotiate
);
/* IE8 */
CHECK_CALLED
(
BeginningTransaction
);
ok
(
hres
==
S_OK
,
"BeginningTransaction failed: %08x
\n
"
,
hres
);
...
...
@@ -1980,7 +1976,6 @@ static BOOL test_bscholder(IBindStatusCallback *holder)
SET_EXPECT
(
GetRootSecurityId
);
hres
=
IHttpNegotiate2_GetRootSecurityId
(
http_negotiate2
,
(
void
*
)
0xdeadbeef
,
(
void
*
)
0xdeadbeef
,
0
);
ok
(
hres
==
E_NOTIMPL
,
"GetRootSecurityId failed: %08x
\n
"
,
hres
);
todo_wine
CHECK_CALLED_BROKEN
(
QueryInterface_IHttpNegotiate2
);
/* IE8 */
CHECK_CALLED
(
GetRootSecurityId
);
...
...
@@ -2001,7 +1996,6 @@ static BOOL test_bscholder(IBindStatusCallback *holder)
wstr
=
(
void
*
)
0xdeadbeef
;
hres
=
IHttpNegotiate_OnResponse
(
http_negotiate
,
200
,
emptyW
,
NULL
,
NULL
);
ok
(
hres
==
S_OK
,
"OnResponse failed: %08x
\n
"
,
hres
);
todo_wine
CHECK_CALLED_BROKEN
(
QueryInterface_IHttpNegotiate
);
/* IE8 */
CHECK_CALLED
(
OnResponse
);
...
...
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