Set bytes written in callback in wxWebRequestWinHTTP

This commit is contained in:
Maarten Bent
2021-01-30 22:09:34 +01:00
parent 71a64f1d20
commit 53a05f431f

View File

@@ -184,8 +184,12 @@ wxWebRequestWinHTTP::HandleCallback(DWORD dwInternetStatus,
break; break;
case WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE: case WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE:
{
DWORD written = *(reinterpret_cast<LPDWORD>(lpvStatusInformation));
m_dataWritten += written;
WriteData(); WriteData();
break; break;
}
case WINHTTP_CALLBACK_STATUS_REQUEST_ERROR: case WINHTTP_CALLBACK_STATUS_REQUEST_ERROR:
{ {
@@ -230,10 +234,7 @@ void wxWebRequestWinHTTP::WriteData()
) ) ) )
{ {
SetFailedWithLastError(); SetFailedWithLastError();
return;
} }
m_dataWritten += dataWriteSize;
} }
void wxWebRequestWinHTTP::CreateResponse() void wxWebRequestWinHTTP::CreateResponse()