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
5d642549
Commit
5d642549
authored
Nov 09, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Use a separate function to set request parameters.
parent
82965248
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
22 deletions
+20
-22
request.c
dlls/winhttp/request.c
+20
-22
No files found.
dlls/winhttp/request.c
View file @
5d642549
...
...
@@ -2841,6 +2841,25 @@ error:
return
HRESULT_FROM_WIN32
(
err
);
}
static
DWORD
request_set_parameters
(
struct
winhttp_request
*
request
)
{
if
(
!
WinHttpSetOption
(
request
->
hrequest
,
WINHTTP_OPTION_PROXY
,
&
request
->
proxy
,
sizeof
(
request
->
proxy
)
))
return
get_last_error
();
if
(
!
WinHttpSetOption
(
request
->
hrequest
,
WINHTTP_OPTION_AUTOLOGON_POLICY
,
&
request
->
logon_policy
,
sizeof
(
request
->
logon_policy
)
))
return
get_last_error
();
if
(
!
WinHttpSetOption
(
request
->
hrequest
,
WINHTTP_OPTION_DISABLE_FEATURE
,
&
request
->
disable_feature
,
sizeof
(
request
->
disable_feature
)
))
return
get_last_error
();
if
(
!
WinHttpSetTimeouts
(
request
->
hrequest
,
request
->
resolve_timeout
,
request
->
connect_timeout
,
request
->
send_timeout
,
request
->
receive_timeout
))
return
get_last_error
();
return
ERROR_SUCCESS
;
}
static
HRESULT
request_send
(
struct
winhttp_request
*
request
)
{
SAFEARRAY
*
sa
=
NULL
;
...
...
@@ -2851,28 +2870,7 @@ static HRESULT request_send( struct winhttp_request *request )
BOOL
ret
;
DWORD
err
;
if
(
!
WinHttpSetOption
(
request
->
hrequest
,
WINHTTP_OPTION_PROXY
,
&
request
->
proxy
,
sizeof
(
request
->
proxy
)
))
{
return
HRESULT_FROM_WIN32
(
get_last_error
()
);
}
if
(
!
WinHttpSetOption
(
request
->
hrequest
,
WINHTTP_OPTION_AUTOLOGON_POLICY
,
&
request
->
logon_policy
,
sizeof
(
request
->
logon_policy
)
))
{
return
HRESULT_FROM_WIN32
(
get_last_error
()
);
}
if
(
!
WinHttpSetOption
(
request
->
hrequest
,
WINHTTP_OPTION_DISABLE_FEATURE
,
&
request
->
disable_feature
,
sizeof
(
request
->
disable_feature
)
))
{
return
HRESULT_FROM_WIN32
(
get_last_error
()
);
}
if
(
!
WinHttpSetTimeouts
(
request
->
hrequest
,
request
->
resolve_timeout
,
request
->
connect_timeout
,
request
->
send_timeout
,
request
->
receive_timeout
))
{
return
HRESULT_FROM_WIN32
(
get_last_error
()
);
}
if
((
err
=
request_set_parameters
(
request
)))
return
HRESULT_FROM_WIN32
(
err
);
VariantInit
(
&
data
);
if
(
strcmpW
(
request
->
verb
,
getW
)
&&
VariantChangeType
(
&
data
,
&
request
->
data
,
0
,
VT_ARRAY
|
VT_UI1
)
==
S_OK
)
{
...
...
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