Commit 3a8ccb92 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

winhttp: Process end of read data before sending callback in read_data().

parent d349013d
...@@ -1848,6 +1848,7 @@ static DWORD read_data( struct request *request, void *buffer, DWORD size, DWORD ...@@ -1848,6 +1848,7 @@ static DWORD read_data( struct request *request, void *buffer, DWORD size, DWORD
done: done:
TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, request->content_read, request->content_length ); TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, request->content_read, request->content_length );
if (end_of_read_data( request )) finished_reading( request );
if (async) if (async)
{ {
if (!ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, buffer, bytes_read ); if (!ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, buffer, bytes_read );
...@@ -1861,7 +1862,6 @@ done: ...@@ -1861,7 +1862,6 @@ done:
} }
if (!ret && read) *read = bytes_read; if (!ret && read) *read = bytes_read;
if (end_of_read_data( request )) finished_reading( request );
return ret; return ret;
} }
......
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