From 718a10190b5da5eb9e63157658b4035822fb866e Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 1 May 2013 12:11:35 -0300 Subject: 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. --- src/leap/soledad/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3