Merge pull request #19 from uguatel/master

Clone headers before setting user-agent to preserve the semantics of httplib2 request method
This commit is contained in:
John Asmuth
2014-06-20 12:50:37 -04:00

View File

@@ -490,10 +490,12 @@ class OAuth2Credentials(Credentials):
logger.info('Attempting refresh to obtain initial access_token')
self._refresh(request_orig)
# Modify the request headers to add the appropriate
# Clone and modify the request headers to add the appropriate
# Authorization header.
if headers is None:
headers = {}
else:
headers = dict(headers)
self.apply(headers)
if self.user_agent is not None: