http: assume data EOF if the connection terminates
authorFelix Fietkau <nbd@openwrt.org>
Sat, 23 Jan 2016 18:59:25 +0000 (19:59 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 23 Jan 2016 19:00:33 +0000 (20:00 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient-http.c

index e58cf274b3a6cef5b06929462c7638f3d648afa1..5e5f9961e20d6ffc56de980123f1e2d35862c53a 100644 (file)
@@ -192,6 +192,9 @@ static void uclient_notify_eof(struct uclient_http *uh)
                        return;
        }
 
+       if (uh->content_length < 0 && uh->read_chunked >= 0)
+               uh->uc.data_eof = true;
+
        uclient_backend_set_eof(&uh->uc);
 
        if (uh->connection_close)