From f67f67ce911eec4d89c757b15136faa40d8262be Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 1 Jul 2025 21:22:45 +0200 Subject: [PATCH] Ingress: Stop streaming response if stream is EOF An empty data chunk signifies EOF. Stop streaming the response in that case. See https://github.com/aio-libs/aiohttp/blob/v3.12.13/aiohttp/streams.py#L471-L474. --- supervisor/api/ingress.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/supervisor/api/ingress.py b/supervisor/api/ingress.py index a01d4de21..ecb407d46 100644 --- a/supervisor/api/ingress.py +++ b/supervisor/api/ingress.py @@ -280,6 +280,8 @@ class APIIngress(CoreSysAttributes): response.headers["X-Accel-Buffering"] = "no" await response.prepare(request) async for data, _ in result.content.iter_chunks(): + if not data: + break await response.write(data) except (