Merge pull request #3519 from fpghost/master

[MRG+1] the strip() isnt needed after base64 encoding user pass
This commit is contained in:
Daniel Graña 2018-12-26 11:08:49 -03:00 committed by GitHub
commit d473be2040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class HttpProxyMiddleware(object):
user_pass = to_bytes(
'%s:%s' % (unquote(username), unquote(password)),
encoding=self.auth_encoding)
return base64.b64encode(user_pass).strip()
return base64.b64encode(user_pass)
def _get_proxy(self, url, orig_type):
proxy_type, user, password, hostport = _parse_proxy(url)