From 6241f006ef51e83a215fca4937146e7685357380 Mon Sep 17 00:00:00 2001 From: yangfan Date: Mon, 10 Apr 2023 21:18:09 +0800 Subject: [PATCH] Fix bug in headers where Content-Type is overwritten --- src/aiooss2/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aiooss2/http.py b/src/aiooss2/http.py index c128cfc..8afc447 100644 --- a/src/aiooss2/http.py +++ b/src/aiooss2/http.py @@ -41,7 +41,8 @@ def __init__( # pylint: disable=too-many-arguments else: self.headers = headers - self.headers["Content-Type"] = "application/octet-stream" + if "Content-Type" not in self.headers: + self.headers["Content-Type"] = "application/octet-stream" if "User-Agent" not in self.headers: if app_name: self.headers["User-Agent"] = USER_AGENT + "/" + app_name