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
f213cdbc
Commit
f213cdbc
authored
Jan 20, 2011
by
Greg Geldorp
Committed by
Alexandre Julliard
Jan 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp/tests: No reconnect on redirect when using proxy.
parent
ba229eed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
8 deletions
+34
-8
notification.c
dlls/winhttp/tests/notification.c
+34
-8
No files found.
dlls/winhttp/tests/notification.c
View file @
f213cdbc
...
...
@@ -46,6 +46,7 @@ struct notification
unsigned
int
status
;
/* status received */
int
todo
;
int
ignore
;
int
skipped_for_proxy
;
};
struct
info
...
...
@@ -58,6 +59,25 @@ struct info
unsigned
int
line
;
};
static
BOOL
proxy_active
(
void
)
{
WINHTTP_PROXY_INFO
proxy_info
;
BOOL
active
=
FALSE
;
if
(
WinHttpGetDefaultProxyConfiguration
(
&
proxy_info
))
{
active
=
(
proxy_info
.
lpszProxy
!=
NULL
);
if
(
active
)
GlobalFree
((
HGLOBAL
)
proxy_info
.
lpszProxy
);
if
(
proxy_info
.
lpszProxyBypass
!=
NULL
)
GlobalFree
((
HGLOBAL
)
proxy_info
.
lpszProxyBypass
);
}
else
active
=
FALSE
;
return
active
;
}
static
void
CALLBACK
check_notification
(
HINTERNET
handle
,
DWORD_PTR
context
,
DWORD
status
,
LPVOID
buffer
,
DWORD
buflen
)
{
BOOL
status_ok
,
function_ok
;
...
...
@@ -88,6 +108,12 @@ static void CALLBACK check_notification( HINTERNET handle, DWORD_PTR context, DW
}
}
if
(
status_ok
)
info
->
index
++
;
if
(
proxy_active
())
{
while
(
info
->
test
[
info
->
index
].
skipped_for_proxy
)
info
->
index
++
;
}
if
(
status
&
(
WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS
|
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
))
{
SetEvent
(
info
->
wait
);
...
...
@@ -222,10 +248,10 @@ static const struct notification redirect_test[] =
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_REDIRECT
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RESOLVING_NAME
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_NAME_RESOLVED
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RESOLVING_NAME
,
0
,
0
,
1
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_NAME_RESOLVED
,
0
,
0
,
1
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER
,
0
,
0
,
1
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER
,
0
,
0
,
1
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_SENDING_REQUEST
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_REQUEST_SENT
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
0
},
...
...
@@ -299,10 +325,10 @@ static const struct notification async_test[] =
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_REDIRECT
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RESOLVING_NAME
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_NAME_RESOLVED
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RESOLVING_NAME
,
0
,
0
,
1
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_NAME_RESOLVED
,
0
,
0
,
1
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER
,
0
,
0
,
1
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER
,
0
,
0
,
1
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_SENDING_REQUEST
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_REQUEST_SENT
,
0
},
{
winhttp_receive_response
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
0
},
...
...
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