From d7a5349a7f049b6875e2cf599e9f9e828dddee18 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Tue, 19 Nov 2024 10:43:56 +0100 Subject: [PATCH] Fix bad file test fixture server --- pulp_file/pytest_plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pulp_file/pytest_plugin.py b/pulp_file/pytest_plugin.py index 92f2c159e1..a995b714c0 100644 --- a/pulp_file/pytest_plugin.py +++ b/pulp_file/pytest_plugin.py @@ -331,8 +331,10 @@ async def handler(request): chunk2 = await f.read() await response.write(chunk2[:-1]) await response.write(bytes([chunk2[-1] ^ 1])) + else: + request.transport.close() - await response.write_eof() + return response app = web.Application() app.add_routes([web.get("/{tail:.*}", handler)])