Remove needless whitespace strips (#1048)
This commit is contained in:
parent
8dea2c23d7
commit
2f0e0480da
@ -76,7 +76,7 @@ class BasicAuth(Auth):
|
||||
self, username: typing.Union[str, bytes], password: typing.Union[str, bytes]
|
||||
) -> str:
|
||||
userpass = b":".join((to_bytes(username), to_bytes(password)))
|
||||
token = b64encode(userpass).decode().strip()
|
||||
token = b64encode(userpass).decode()
|
||||
return f"Basic {token}"
|
||||
|
||||
|
||||
|
||||
@ -355,7 +355,7 @@ class Proxy:
|
||||
|
||||
def build_auth_header(self, username: str, password: str) -> str:
|
||||
userpass = (username.encode("utf-8"), password.encode("utf-8"))
|
||||
token = b64encode(b":".join(userpass)).decode().strip()
|
||||
token = b64encode(b":".join(userpass)).decode()
|
||||
return f"Basic {token}"
|
||||
|
||||
def __repr__(self) -> str:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user