wininet: Return synchronously from InternetReadFile if there is no more data to read.

Similar to 87fffa1ebf.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-05-11 23:25:18 +02:00 committed by Alexandre Julliard
parent b9357ecaad
commit a3a572beb0

View File

@ -3242,7 +3242,7 @@ static DWORD HTTPREQ_ReadFile(object_header_t *hdr, void *buffer, DWORD size, DW
if (TryEnterCriticalSection( &req->read_section ))
{
if (get_avail_data(req))
if (get_avail_data(req) || end_of_read_data(req))
{
res = HTTPREQ_Read(req, buffer, size, read);
LeaveCriticalSection( &req->read_section );