wininet: Handle NULL lpBuffersIn in HttpSendRequestExW.

This commit is contained in:
Aric Stewart 2006-01-13 13:52:38 +01:00 committed by Alexandre Julliard
parent d37d5cd51d
commit 21712d3d15
1 changed files with 19 additions and 7 deletions

View File

@ -1788,15 +1788,27 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
workRequest.asyncall = HTTPSENDREQUESTW; workRequest.asyncall = HTTPSENDREQUESTW;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr ); workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
req = &workRequest.u.HttpSendRequestW; req = &workRequest.u.HttpSendRequestW;
if (lpBuffersIn->lpcszHeader) if (lpBuffersIn)
/* FIXME: this should use dwHeadersLength or may not be necessary at all */ {
req->lpszHeader = WININET_strdupW(lpBuffersIn->lpcszHeader); 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 else
{
req->lpszHeader = NULL; req->lpszHeader = NULL;
req->dwHeaderLength = lpBuffersIn->dwHeadersLength; req->dwHeaderLength = 0;
req->lpOptional = lpBuffersIn->lpvBuffer; req->lpOptional = NULL;
req->dwOptionalLength = lpBuffersIn->dwBufferLength; req->dwOptionalLength = 0;
req->dwContentLength = lpBuffersIn->dwBufferTotal; req->dwContentLength = 0;
}
req->bEndRequest = FALSE; req->bEndRequest = FALSE;
INTERNET_AsyncCall(&workRequest); INTERNET_AsyncCall(&workRequest);