From cfdc539972f8e0a69b8f2cfc13a089e6488a3897 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 10 Jun 2011 14:47:27 +0200 Subject: [PATCH] wininet: Set content_length when we reach end of data in netconn_read. --- dlls/wininet/http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 520d17c0a28..f8386b8bb5d 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2346,6 +2346,8 @@ static DWORD netconn_read(data_stream_t *stream, http_request_t *req, BYTE *buf, if(size && req->netconn) { if(NETCON_recv(req->netconn, buf, size, read_mode == READMODE_SYNC ? MSG_WAITALL : 0, &len) != ERROR_SUCCESS) len = 0; + if(!len) + netconn_stream->content_length = netconn_stream->content_read; } netconn_stream->content_read += *read = len;