Skip to content

Commit

Permalink
Fix bug in headers where Content-Type is overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfan authored and karajan1001 committed Apr 16, 2023
1 parent 2968203 commit 6241f00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aiooss2/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6241f00

Please sign in to comment.