wininet: Don't start reading when POST data hasn't been completely written.

This commit is contained in:
Hans Leidekker 2009-04-08 15:22:26 +02:00 committed by Alexandre Julliard
parent 85eb438ff7
commit 3a711fb56b
1 changed files with 17 additions and 4 deletions

View File

@ -3513,10 +3513,23 @@ lend:
/* TODO: send notification for P3P header */
if(lpwhr->lpHttpSession->lpAppInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC) {
if(bSuccess) {
HTTP_ReceiveRequestData(lpwhr, TRUE);
}else {
if (lpwhr->lpHttpSession->lpAppInfo->hdr.dwFlags & INTERNET_FLAG_ASYNC)
{
if (bSuccess)
{
if (lpwhr->dwBytesWritten == lpwhr->dwBytesToWrite) HTTP_ReceiveRequestData(lpwhr, TRUE);
else
{
iar.dwResult = (DWORD_PTR)lpwhr->hdr.hInternet;
iar.dwError = 0;
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
INTERNET_STATUS_REQUEST_COMPLETE, &iar,
sizeof(INTERNET_ASYNC_RESULT));
}
}
else
{
iar.dwResult = (DWORD_PTR)lpwhr->hdr.hInternet;
iar.dwError = INTERNET_GetLastError();