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
acb1f030
Commit
acb1f030
authored
Jun 06, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Support BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS in BindProtocol object.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ccc5ba29
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
bindprot.c
dlls/urlmon/bindprot.c
+46
-0
No files found.
dlls/urlmon/bindprot.c
View file @
acb1f030
...
...
@@ -732,6 +732,11 @@ static HRESULT WINAPI ProtocolHandler_Terminate(IInternetProtocol *iface, DWORD
This
->
bind_info
=
NULL
;
}
if
(
This
->
redirect_callback
)
{
IBindCallbackRedirect_Release
(
This
->
redirect_callback
);
This
->
redirect_callback
=
NULL
;
}
IInternetProtocolEx_Release
(
&
This
->
IInternetProtocolEx_iface
);
return
S_OK
;
}
...
...
@@ -994,6 +999,29 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportData(IInternetProtocolSink *ifac
return
IInternetProtocolSink_ReportData
(
This
->
protocol_sink
,
bscf
,
progress
,
progress_max
);
}
static
HRESULT
handle_redirect
(
BindProtocol
*
This
,
const
WCHAR
*
url
)
{
HRESULT
hres
;
if
(
This
->
redirect_callback
)
{
VARIANT_BOOL
cancel
=
VARIANT_FALSE
;
IBindCallbackRedirect_Redirect
(
This
->
redirect_callback
,
url
,
&
cancel
);
if
(
cancel
)
return
INET_E_REDIRECT_FAILED
;
}
if
(
This
->
protocol_sink
)
{
hres
=
IInternetProtocolSink_ReportProgress
(
This
->
protocol_sink
,
BINDSTATUS_REDIRECTING
,
url
);
if
(
FAILED
(
hres
))
return
hres
;
}
IInternetProtocol_Terminate
(
This
->
protocol
,
0
);
/* should this be done in StartEx? */
release_protocol_handler
(
This
);
return
IInternetProtocolEx_Start
(
&
This
->
IInternetProtocolEx_iface
,
url
,
This
->
protocol_sink
,
This
->
bind_info
,
This
->
pi
,
0
);
}
static
HRESULT
WINAPI
ProtocolSinkHandler_ReportResult
(
IInternetProtocolSink
*
iface
,
HRESULT
hrResult
,
DWORD
dwError
,
LPCWSTR
szResult
)
{
...
...
@@ -1001,6 +1029,13 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportResult(IInternetProtocolSink *if
TRACE
(
"(%p)->(%08x %d %s)
\n
"
,
This
,
hrResult
,
dwError
,
debugstr_w
(
szResult
));
if
(
hrResult
==
INET_E_REDIRECT_FAILED
)
{
hrResult
=
handle_redirect
(
This
,
szResult
);
if
(
hrResult
==
S_OK
)
return
S_OK
;
szResult
=
NULL
;
}
if
(
This
->
protocol_sink
)
return
IInternetProtocolSink_ReportResult
(
This
->
protocol_sink
,
hrResult
,
dwError
,
szResult
);
return
S_OK
;
...
...
@@ -1054,6 +1089,17 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface,
return
hres
;
}
if
((
pbindinfo
->
dwOptions
&
BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS
)
&&
!
This
->
redirect_callback
)
{
IServiceProvider
*
service_provider
;
hres
=
IInternetProtocolSink_QueryInterface
(
This
->
protocol_sink
,
&
IID_IServiceProvider
,
(
void
**
)
&
service_provider
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IServiceProvider_QueryService
(
service_provider
,
&
IID_IBindCallbackRedirect
,
&
IID_IBindCallbackRedirect
,
(
void
**
)
&
This
->
redirect_callback
);
IServiceProvider_Release
(
service_provider
);
}
}
*
grfBINDF
|=
BINDF_FROMURLMON
;
return
hres
;
}
...
...
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