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
940a67c8
Commit
940a67c8
authored
Jan 28, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Moved WORKREQ_HTTPSENDREQUESTW out of WORKREQUEST.
parent
63e6a4b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
51 deletions
+42
-51
http.c
dlls/wininet/http.c
+42
-40
internet.h
dlls/wininet/internet.h
+0
-11
No files found.
dlls/wininet/http.c
View file @
940a67c8
...
...
@@ -4930,23 +4930,32 @@ lend:
return
res
;
}
typedef
struct
{
task_header_t
hdr
;
WCHAR
*
headers
;
DWORD
headers_len
;
void
*
optional
;
DWORD
optional_len
;
DWORD
content_len
;
BOOL
end_request
;
}
send_request_task_t
;
/***********************************************************************
*
* Helper functions for the HttpSendRequest(Ex) functions
*
*/
static
void
AsyncHttpSendRequestProc
(
WORKREQUEST
*
workRequest
)
static
void
AsyncHttpSendRequestProc
(
task_header_t
*
hdr
)
{
s
truct
WORKREQ_HTTPSENDREQUESTW
const
*
req
=
&
workRequest
->
u
.
HttpSendRequestW
;
http_request_t
*
request
=
(
http_request_t
*
)
workRequest
->
hdr
;
s
end_request_task_t
*
task
=
(
send_request_task_t
*
)
hdr
;
http_request_t
*
request
=
(
http_request_t
*
)
task
->
hdr
.
hdr
;
TRACE
(
"%p
\n
"
,
request
);
HTTP_HttpSendRequestW
(
request
,
req
->
lpszHeader
,
req
->
dwHeaderLength
,
req
->
lpOptional
,
req
->
dwOptionalLength
,
req
->
dwContentLength
,
req
->
bEndRequest
);
HTTP_HttpSendRequestW
(
request
,
task
->
headers
,
task
->
headers_len
,
task
->
optional
,
task
->
optional_len
,
task
->
content_len
,
task
->
end_request
);
heap_free
(
req
->
lpszHeader
);
heap_free
(
task
->
headers
);
}
...
...
@@ -5211,11 +5220,9 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
if
(
hIC
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
)
{
WORKREQUEST
*
task
;
struct
WORKREQ_HTTPSENDREQUESTW
*
req
;
send_request_task_t
*
task
;
task
=
alloc_async_task
(
&
request
->
hdr
,
AsyncHttpSendRequestProc
,
sizeof
(
*
task
));
req
=
&
task
->
u
.
HttpSendRequestW
;
if
(
lpBuffersIn
)
{
DWORD
size
=
0
;
...
...
@@ -5227,31 +5234,28 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
else
size
=
lpBuffersIn
->
dwHeadersLength
*
sizeof
(
WCHAR
);
req
->
lpszHeader
=
heap_alloc
(
size
);
memcpy
(
req
->
lpszHeader
,
lpBuffersIn
->
lpcszHeader
,
size
);
task
->
headers
=
heap_alloc
(
size
);
memcpy
(
task
->
headers
,
lpBuffersIn
->
lpcszHeader
,
size
);
}
else
req
->
lpszHeader
=
NULL
;
else
task
->
headers
=
NULL
;
req
->
dwHeaderLength
=
size
/
sizeof
(
WCHAR
);
req
->
lpO
ptional
=
lpBuffersIn
->
lpvBuffer
;
req
->
dwOptionalLength
=
lpBuffersIn
->
dwBufferLength
;
req
->
dwContentLength
=
lpBuffersIn
->
dwBufferTotal
;
task
->
headers_len
=
size
/
sizeof
(
WCHAR
);
task
->
o
ptional
=
lpBuffersIn
->
lpvBuffer
;
task
->
optional_len
=
lpBuffersIn
->
dwBufferLength
;
task
->
content_len
=
lpBuffersIn
->
dwBufferTotal
;
}
else
{
req
->
lpszHeader
=
NULL
;
req
->
dwHeaderLength
=
0
;
req
->
lpO
ptional
=
NULL
;
req
->
dwOptionalLength
=
0
;
req
->
dwContentLength
=
0
;
task
->
headers
=
NULL
;
task
->
headers_len
=
0
;
task
->
o
ptional
=
NULL
;
task
->
optional_len
=
0
;
task
->
content_len
=
0
;
}
req
->
bEndR
equest
=
FALSE
;
task
->
end_r
equest
=
FALSE
;
INTERNET_AsyncCall
(
task
);
/*
* This is from windows.
*/
INTERNET_AsyncCall
(
&
task
->
hdr
);
res
=
ERROR_IO_PENDING
;
}
else
...
...
@@ -5317,11 +5321,9 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
if
(
hIC
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
)
{
WORKREQUEST
*
task
;
struct
WORKREQ_HTTPSENDREQUESTW
*
req
;
send_request_task_t
*
task
;
task
=
alloc_async_task
(
&
request
->
hdr
,
AsyncHttpSendRequestProc
,
sizeof
(
*
task
));
req
=
&
task
->
u
.
HttpSendRequestW
;
if
(
lpszHeaders
)
{
DWORD
size
;
...
...
@@ -5329,18 +5331,18 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
if
(
dwHeaderLength
==
~
0u
)
size
=
(
strlenW
(
lpszHeaders
)
+
1
)
*
sizeof
(
WCHAR
);
else
size
=
dwHeaderLength
*
sizeof
(
WCHAR
);
req
->
lpszHeader
=
heap_alloc
(
size
);
memcpy
(
req
->
lpszHeader
,
lpszHeaders
,
size
);
task
->
headers
=
heap_alloc
(
size
);
memcpy
(
task
->
headers
,
lpszHeaders
,
size
);
}
else
req
->
lpszHeader
=
0
;
req
->
dwHeaderLength
=
dwHeaderLength
;
req
->
lpO
ptional
=
lpOptional
;
req
->
dwOptionalLength
=
dwOptionalLength
;
req
->
dwContentLength
=
dwOptionalLength
;
req
->
bEndR
equest
=
TRUE
;
INTERNET_AsyncCall
(
task
);
task
->
headers
=
NULL
;
task
->
headers_len
=
dwHeaderLength
;
task
->
o
ptional
=
lpOptional
;
task
->
optional_len
=
dwOptionalLength
;
task
->
content_len
=
dwOptionalLength
;
task
->
end_r
equest
=
TRUE
;
INTERNET_AsyncCall
(
&
task
->
hdr
);
res
=
ERROR_IO_PENDING
;
}
else
...
...
dlls/wininet/internet.h
View file @
940a67c8
...
...
@@ -427,16 +427,6 @@ struct WORKREQ_FTPFINDNEXTW
LPWIN32_FIND_DATAW
lpFindFileData
;
};
struct
WORKREQ_HTTPSENDREQUESTW
{
LPWSTR
lpszHeader
;
DWORD
dwHeaderLength
;
LPVOID
lpOptional
;
DWORD
dwOptionalLength
;
DWORD
dwContentLength
;
BOOL
bEndRequest
;
};
struct
WORKREQ_HTTPENDREQUESTW
{
DWORD
dwFlags
;
...
...
@@ -488,7 +478,6 @@ typedef struct WORKREQ
struct
WORKREQ_FTPREMOVEDIRECTORYW
FtpRemoveDirectoryW
;
struct
WORKREQ_FTPRENAMEFILEW
FtpRenameFileW
;
struct
WORKREQ_FTPFINDNEXTW
FtpFindNextW
;
struct
WORKREQ_HTTPSENDREQUESTW
HttpSendRequestW
;
struct
WORKREQ_HTTPENDREQUESTW
HttpEndRequestW
;
struct
WORKREQ_SENDCALLBACK
SendCallback
;
struct
WORKREQ_INTERNETOPENURLW
InternetOpenUrlW
;
...
...
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