From c35d9db9362e095553f2c043b1a2bf195435bc09 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 23 Jan 2016 19:59:25 +0100 Subject: [PATCH] http: assume data EOF if the connection terminates Signed-off-by: Felix Fietkau --- uclient-http.c | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.11.0