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.
This commit is contained in:
Stefan Agner 2025-07-01 21:22:45 +02:00
parent 38750d74a8
commit f67f67ce91
No known key found for this signature in database
GPG Key ID: AE01353D1E44747D

View File

@ -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 (