diff options
author | drebs <drebs@leap.se> | 2013-05-01 12:11:35 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-05-01 12:11:35 -0300 |
commit | 718a10190b5da5eb9e63157658b4035822fb866e (patch) | |
tree | 1976ce139edff59da7da882f3488c897b667a98b /src | |
parent | 30e8535d9af643d2ab722a4921ab52d94c2930dd (diff) |
Fix HTTP request bug.
Base64 encoding returned a \n at the end of the string and that was causing
trouble on the HTTP request when the token was added as an http header.
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/soledad/auth.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leap/soledad/auth.py b/src/leap/soledad/auth.py index 080bb806..a099c1a6 100644 --- a/src/leap/soledad/auth.py +++ b/src/leap/soledad/auth.py @@ -53,6 +53,6 @@ def _sign_request(self, method, url_query, params): if 'token' in self._creds: uuid, token = self._creds['token'] auth = '%s:%s' % (uuid, token) - return [('Authorization', 'Token %s' % auth.encode('base64'))] + return [('Authorization', 'Token %s' % auth.encode('base64')[:-1])] else: return HTTPClientBase._sign_request(self, method, url_query, params) |