diff --git a/dlls/urlmon/protocol.c b/dlls/urlmon/protocol.c index 87dbe4b4f93..9b25cbf4307 100644 --- a/dlls/urlmon/protocol.c +++ b/dlls/urlmon/protocol.c @@ -338,16 +338,16 @@ HRESULT protocol_read(Protocol *protocol, void *buf, ULONG size, ULONG *read_ret BOOL res; HRESULT hres = S_FALSE; - if(!(protocol->flags & FLAG_REQUEST_COMPLETE)) { - *read_ret = 0; - return E_PENDING; - } - if(protocol->flags & FLAG_ALL_DATA_READ) { *read_ret = 0; return S_FALSE; } + if(!(protocol->flags & FLAG_REQUEST_COMPLETE)) { + *read_ret = 0; + return E_PENDING; + } + while(read < size) { if(protocol->available_bytes) { ULONG len;