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 e58cf27..5e5f996 100644 (file)
@@ -192,6 +192,9 @@ static void uclient_notify_eof(struct uclient_http *uh)
                        return;
        }
 
                        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)
        uclient_backend_set_eof(&uh->uc);
 
        if (uh->connection_close)