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
efd869e0
Commit
efd869e0
authored
Dec 15, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added support for BINDSTATUS_REDIRECTING.
parent
6de5669d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
binding.c
dlls/urlmon/binding.c
+3
-0
bindprot.c
dlls/urlmon/bindprot.c
+1
-0
url.c
dlls/urlmon/tests/url.c
+23
-2
No files found.
dlls/urlmon/binding.c
View file @
efd869e0
...
...
@@ -967,6 +967,9 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink
case
BINDSTATUS_CONNECTING
:
on_progress
(
This
,
0
,
0
,
BINDSTATUS_CONNECTING
,
szStatusText
);
break
;
case
BINDSTATUS_REDIRECTING
:
on_progress
(
This
,
0
,
0
,
BINDSTATUS_REDIRECTING
,
szStatusText
);
break
;
case
BINDSTATUS_BEGINDOWNLOADDATA
:
fill_stgmed_buffer
(
This
->
stgmed_buf
);
break
;
...
...
dlls/urlmon/bindprot.c
View file @
efd869e0
...
...
@@ -960,6 +960,7 @@ static void report_progress(BindProtocol *This, ULONG status_code, LPCWSTR statu
switch
(
status_code
)
{
case
BINDSTATUS_FINDINGRESOURCE
:
case
BINDSTATUS_CONNECTING
:
case
BINDSTATUS_REDIRECTING
:
case
BINDSTATUS_BEGINDOWNLOADDATA
:
case
BINDSTATUS_SENDINGREQUEST
:
case
BINDSTATUS_CACHEFILENAMEAVAILABLE
:
...
...
dlls/urlmon/tests/url.c
View file @
efd869e0
...
...
@@ -100,6 +100,7 @@ DEFINE_EXPECT(GetBindInfoEx);
DEFINE_EXPECT
(
OnStartBinding
);
DEFINE_EXPECT
(
OnProgress_FINDINGRESOURCE
);
DEFINE_EXPECT
(
OnProgress_CONNECTING
);
DEFINE_EXPECT
(
OnProgress_REDIRECTING
);
DEFINE_EXPECT
(
OnProgress_SENDINGREQUEST
);
DEFINE_EXPECT
(
OnProgress_MIMETYPEAVAILABLE
);
DEFINE_EXPECT
(
OnProgress_BEGINDOWNLOADDATA
);
...
...
@@ -181,6 +182,7 @@ static IBinding *current_binding;
static
HANDLE
complete_event
,
complete_event2
;
static
HRESULT
binding_hres
;
static
BOOL
have_IHttpNegotiate2
,
use_bscex
;
static
BOOL
test_redirect
;
static
LPCWSTR
urls
[]
=
{
WINE_ABOUT_URL
,
...
...
@@ -380,13 +382,21 @@ static DWORD WINAPI thread_proc(PVOID arg)
SET_EXPECT
(
OnProgress_SENDINGREQUEST
);
hres
=
IInternetProtocolSink_ReportProgress
(
protocol_sink
,
BINDSTATUS_SENDINGREQUEST
,
NULL
);
ok
(
hres
==
S_OK
,
"ReportPro
x
gress failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"ReportProgress failed: %08x
\n
"
,
hres
);
WaitForSingleObject
(
complete_event
,
INFINITE
);
if
(
bind_to_object
)
CHECK_CALLED
(
Obj_OnProgress_SENDINGREQUEST
);
else
CHECK_CALLED
(
OnProgress_SENDINGREQUEST
);
if
(
test_redirect
)
{
SET_EXPECT
(
OnProgress_REDIRECTING
);
hres
=
IInternetProtocolSink_ReportProgress
(
protocol_sink
,
BINDSTATUS_REDIRECTING
,
WINE_ABOUT_URL
);
ok
(
hres
==
S_OK
,
"ReportProgress(BINDSTATUS_REFIRECTING) failed: %08x
\n
"
,
hres
);
WaitForSingleObject
(
complete_event
,
INFINITE
);
CHECK_CALLED
(
OnProgress_REDIRECTING
);
}
test_switch_fail
();
SET_EXPECT
(
Continue
);
...
...
@@ -773,7 +783,7 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocol *iface,
IHttpNegotiate_Release
(
http_negotiate
);
ok
(
hres
==
S_OK
,
"OnResponse failed: %08x
\n
"
,
hres
);
if
(
test_protocol
==
HTTPS_TEST
)
{
if
(
test_protocol
==
HTTPS_TEST
||
test_redirect
)
{
hres
=
IInternetProtocolSink_ReportProgress
(
protocol_sink
,
BINDSTATUS_ACCEPTRANGES
,
NULL
);
ok
(
hres
==
S_OK
,
"ReportProgress(BINDSTATUS_ACCEPTRANGES) failed: %08x
\n
"
,
hres
);
}
...
...
@@ -1275,6 +1285,12 @@ static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG u
if
((
bindf
&
BINDF_ASYNCHRONOUS
)
&&
emulate_protocol
)
SetEvent
(
complete_event
);
break
;
case
BINDSTATUS_REDIRECTING
:
CHECK_EXPECT
(
OnProgress_REDIRECTING
);
ok
(
!
lstrcmpW
(
szStatusText
,
WINE_ABOUT_URL
),
"unexpected status text %s
\n
"
,
wine_dbgstr_w
(
szStatusText
));
SetEvent
(
complete_event
);
break
;
case
BINDSTATUS_SENDINGREQUEST
:
if
(
iface
==
&
objbsc
)
CHECK_EXPECT
(
Obj_OnProgress_SENDINGREQUEST
);
...
...
@@ -2188,6 +2204,7 @@ static BOOL test_RegisterBindStatusCallback(void)
#define BINDTEST_TOOBJECT 0x0002
#define BINDTEST_FILEDWLAPI 0x0004
#define BINDTEST_HTTPRESPONSE 0x0008
#define BINDTEST_REDIRECT 0x0010
static
void
init_bind_test
(
int
protocol
,
DWORD
flags
,
DWORD
t
)
{
...
...
@@ -2206,6 +2223,7 @@ static void init_bind_test(int protocol, DWORD flags, DWORD t)
urls
[
HTTP_TEST
]
=
SHORT_RESPONSE_URL
;
else
urls
[
HTTP_TEST
]
=
WINE_ABOUT_URL
;
test_redirect
=
(
flags
&
BINDTEST_REDIRECT
)
!=
0
;
}
static
void
test_BindToStorage
(
int
protocol
,
DWORD
flags
,
DWORD
t
)
...
...
@@ -2893,6 +2911,9 @@ START_TEST(url)
trace
(
"emulated http test (to file)...
\n
"
);
test_BindToStorage
(
HTTP_TEST
,
BINDTEST_EMULATE
,
TYMED_FILE
);
trace
(
"emulated http test (redirect)...
\n
"
);
test_BindToStorage
(
HTTP_TEST
,
BINDTEST_EMULATE
|
BINDTEST_REDIRECT
,
TYMED_ISTREAM
);
trace
(
"asynchronous https test...
\n
"
);
test_BindToStorage
(
HTTPS_TEST
,
0
,
TYMED_ISTREAM
);
...
...
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