|
@@ -372,7 +372,7 @@ class HTTPRequest(object):
|
|
|
self.headers[key] = quote(val.encode('utf-8'), safe)
|
|
self.headers[key] = quote(val.encode('utf-8'), safe)
|
|
|
setattr(self, '_headers_quoted', True)
|
|
setattr(self, '_headers_quoted', True)
|
|
|
|
|
|
|
|
- if not self.headers('User-Agent'):
|
|
|
|
|
|
|
+ if not self.headers.get('User-Agent'):
|
|
|
self.headers['User-Agent'] = UserAgent
|
|
self.headers['User-Agent'] = UserAgent
|
|
|
|
|
|
|
|
connection._auth_handler.add_auth(self, **kwargs)
|
|
connection._auth_handler.add_auth(self, **kwargs)
|