uclient-http: set data_eof when content-length is 0
[oweals/uclient.git] / uclient-http.c
index 3168f4c6a58aa372c70587318e5cd80aa4f9c492..c1f722878df76dc5452f34032ff9aac4f52e9d91 100644 (file)
@@ -199,7 +199,8 @@ static void uclient_notify_eof(struct uclient_http *uh)
                        return;
        }
 
-       if (uh->content_length < 0 && uh->read_chunked >= 0)
+       if ((uh->content_length < 0 && uh->read_chunked >= 0) ||
+                       uh->content_length == 0)
                uh->uc.data_eof = true;
 
        uclient_backend_set_eof(&uh->uc);