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
e4471d5f
Commit
e4471d5f
authored
Jan 25, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Store the context passed to WinHttpSendRequest.
parent
02da3663
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
request.c
dlls/winhttp/request.c
+1
-0
winhttp.c
dlls/winhttp/tests/winhttp.c
+14
-3
No files found.
dlls/winhttp/request.c
View file @
e4471d5f
...
...
@@ -1057,6 +1057,7 @@ static BOOL send_request( request_t *request, LPCWSTR headers, DWORD headers_len
TRACE
(
"full request: %s
\n
"
,
debugstr_a
(
req_ascii
));
len
=
strlen
(
req_ascii
);
if
(
context
)
request
->
hdr
.
context
=
context
;
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_SENDING_REQUEST
,
NULL
,
0
);
ret
=
netconn_send
(
&
request
->
netconn
,
req_ascii
,
len
,
0
,
&
bytes_sent
);
...
...
dlls/winhttp/tests/winhttp.c
View file @
e4471d5f
...
...
@@ -248,8 +248,8 @@ static void test_empty_headers_param(void)
static
void
test_SendRequest
(
void
)
{
HINTERNET
session
,
request
,
connection
;
DWORD
header_len
,
optional_len
,
total_len
;
DWORD
bytes_rw
;
DWORD
header_len
,
optional_len
,
total_len
,
bytes_rw
,
size
;
DWORD
_PTR
context
;
BOOL
ret
;
CHAR
buffer
[
256
];
int
i
;
...
...
@@ -284,9 +284,20 @@ static void test_SendRequest (void)
}
ok
(
request
!=
NULL
,
"WinHttpOpenrequest failed to open a request, error: %u.
\n
"
,
GetLastError
());
ret
=
WinHttpSendRequest
(
request
,
content_type
,
header_len
,
post_data
,
optional_len
,
total_len
,
0
);
context
=
0xdeadbeef
;
ret
=
WinHttpSetOption
(
request
,
WINHTTP_OPTION_CONTEXT_VALUE
,
&
context
,
sizeof
(
context
));
ok
(
ret
,
"WinHttpSetOption failed: %u
\n
"
,
GetLastError
());
context
++
;
ret
=
WinHttpSendRequest
(
request
,
content_type
,
header_len
,
post_data
,
optional_len
,
total_len
,
context
);
ok
(
ret
==
TRUE
,
"WinHttpSendRequest failed: %u
\n
"
,
GetLastError
());
context
=
0
;
size
=
sizeof
(
context
);
ret
=
WinHttpQueryOption
(
request
,
WINHTTP_OPTION_CONTEXT_VALUE
,
&
context
,
&
size
);
ok
(
ret
,
"WinHttpQueryOption failed: %u
\n
"
,
GetLastError
());
ok
(
context
==
0xdeadbef0
,
"expected 0xdeadbef0, got %lx
\n
"
,
context
);
for
(
i
=
3
;
post_data
[
i
];
i
++
)
{
bytes_rw
=
-
1
;
...
...
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