From c81c0578e33fbb7273091e72534f3c58830f77a7 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Mon, 11 Oct 2021 17:53:49 +0800 Subject: [PATCH] :bug: fix fastapi forward header duplicate (fix #560) --- nonebot/drivers/fastapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py index 024df15c..00091f0f 100644 --- a/nonebot/drivers/fastapi.py +++ b/nonebot/drivers/fastapi.py @@ -480,7 +480,7 @@ class Driver(ReverseDriver, ForwardDriver): ) return - headers = {**setup_.headers, "host": url.netloc.decode("ascii")} + headers = setup_.headers.copy() logger.debug( f"Bot {setup_.self_id} from adapter {setup_.adapter} connecting to {url}" )