Module: wine Branch: master Commit: 3a8ccb924268c5f9eeff204c87ba30dc0fe587e2 URL: https://source.winehq.org/git/wine.git/?a=commit;h=3a8ccb924268c5f9eeff204c8...
Author: Paul Gofman pgofman@codeweavers.com Date: Fri Oct 15 16:59:49 2021 +0300
winhttp: Process end of read data before sending callback in read_data().
Signed-off-by: Paul Gofman pgofman@codeweavers.com Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winhttp/request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index c908e26956f..d76edfa71d7 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -1848,6 +1848,7 @@ static DWORD read_data( struct request *request, void *buffer, DWORD size, DWORD
done: 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 (!ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, buffer, bytes_read ); @@ -1861,7 +1862,6 @@ done: }
if (!ret && read) *read = bytes_read; - if (end_of_read_data( request )) finished_reading( request ); return ret; }