Commit 21712d3d authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

wininet: Handle NULL lpBuffersIn in HttpSendRequestExW.

parent d37d5cd5
......@@ -1788,15 +1788,27 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
workRequest.asyncall = HTTPSENDREQUESTW;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
req = &workRequest.u.HttpSendRequestW;
if (lpBuffersIn->lpcszHeader)
/* FIXME: this should use dwHeadersLength or may not be necessary at all */
req->lpszHeader = WININET_strdupW(lpBuffersIn->lpcszHeader);
if (lpBuffersIn)
{
if (lpBuffersIn->lpcszHeader)
/* FIXME: this should use dwHeadersLength or may not be necessary at all */
req->lpszHeader = WININET_strdupW(lpBuffersIn->lpcszHeader);
else
req->lpszHeader = NULL;
req->dwHeaderLength = lpBuffersIn->dwHeadersLength;
req->lpOptional = lpBuffersIn->lpvBuffer;
req->dwOptionalLength = lpBuffersIn->dwBufferLength;
req->dwContentLength = lpBuffersIn->dwBufferTotal;
}
else
{
req->lpszHeader = NULL;
req->dwHeaderLength = lpBuffersIn->dwHeadersLength;
req->lpOptional = lpBuffersIn->lpvBuffer;
req->dwOptionalLength = lpBuffersIn->dwBufferLength;
req->dwContentLength = lpBuffersIn->dwBufferTotal;
req->dwHeaderLength = 0;
req->lpOptional = NULL;
req->dwOptionalLength = 0;
req->dwContentLength = 0;
}
req->bEndRequest = FALSE;
INTERNET_AsyncCall(&workRequest);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment