summaryrefslogtreecommitdiff
path: root/uclient-http.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-23 19:59:25 +0100
committerFelix Fietkau <nbd@openwrt.org>2016-01-23 20:00:33 +0100
commitc35d9db9362e095553f2c043b1a2bf195435bc09 (patch)
tree6701300077372d3b07d4ea7925cbc68878f8dec7 /uclient-http.c
parentea129593d022d6edb9237f1888f1f7899a8c6f61 (diff)
downloaduclient-c35d9db9362e095553f2c043b1a2bf195435bc09.tar.gz
http: assume data EOF if the connection terminates
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uclient-http.c')
-rw-r--r--uclient-http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/uclient-http.c b/uclient-http.c
index e58cf27..5e5f996 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -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)