Ensure a custom User-Agent header is not overwritten (#992)

This commit is contained in:
Philip Krauss
2019-08-12 14:20:10 +02:00
committed by Honza Král
parent 100a2e623b
commit 28920b5d59
6 changed files with 52 additions and 11 deletions
+1
View File
@@ -127,6 +127,7 @@ class Urllib3HttpConnection(Connection):
self.headers.update({"content-encoding": "gzip"})
self.headers.setdefault("content-type", "application/json")
self.headers.setdefault("user-agent", self._get_default_user_agent())
pool_class = urllib3.HTTPConnectionPool
kw = {}