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)])