wininet: Handle NULL lpBuffersIn in HttpSendRequestExW.
This commit is contained in:
parent
d37d5cd51d
commit
21712d3d15
|
@ -1788,6 +1788,8 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
|
|||
workRequest.asyncall = HTTPSENDREQUESTW;
|
||||
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
|
||||
req = &workRequest.u.HttpSendRequestW;
|
||||
if (lpBuffersIn)
|
||||
{
|
||||
if (lpBuffersIn->lpcszHeader)
|
||||
/* FIXME: this should use dwHeadersLength or may not be necessary at all */
|
||||
req->lpszHeader = WININET_strdupW(lpBuffersIn->lpcszHeader);
|
||||
|
@ -1797,6 +1799,16 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
|
|||
req->lpOptional = lpBuffersIn->lpvBuffer;
|
||||
req->dwOptionalLength = lpBuffersIn->dwBufferLength;
|
||||
req->dwContentLength = lpBuffersIn->dwBufferTotal;
|
||||
}
|
||||
else
|
||||
{
|
||||
req->lpszHeader = NULL;
|
||||
req->dwHeaderLength = 0;
|
||||
req->lpOptional = NULL;
|
||||
req->dwOptionalLength = 0;
|
||||
req->dwContentLength = 0;
|
||||
}
|
||||
|
||||
req->bEndRequest = FALSE;
|
||||
|
||||
INTERNET_AsyncCall(&workRequest);
|
||||
|
|
Loading…
Reference in New Issue