From 08e40a7692803efe672129e265fddfd793c1f43b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 19 Dec 2024 13:16:30 +0800 Subject: [PATCH] bugfix --- ahserver/globalEnv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ahserver/globalEnv.py b/ahserver/globalEnv.py index 3dced51..38e681f 100644 --- a/ahserver/globalEnv.py +++ b/ahserver/globalEnv.py @@ -50,7 +50,8 @@ def basic_auth_headers(user, passwd): async def stream_response(request, async_data_generator, content_type='text/html'): res = StreamResponse() - res.content_type = content_type + if content_type: + res.content_type = content_type res.set_status(200) await res.prepare(request) async for d in async_data_generator():