From 2f0e0480da43330f6e6dc3aac0457cb5e6ab8470 Mon Sep 17 00:00:00 2001 From: Taneli Hukkinen Date: Sun, 5 Jul 2020 12:58:44 +0300 Subject: [PATCH] Remove needless whitespace strips (#1048) --- httpx/_auth.py | 2 +- httpx/_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/httpx/_auth.py b/httpx/_auth.py index e2278434..ab430973 100644 --- a/httpx/_auth.py +++ b/httpx/_auth.py @@ -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}" diff --git a/httpx/_config.py b/httpx/_config.py index 96c22702..b50acb23 100644 --- a/httpx/_config.py +++ b/httpx/_config.py @@ -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: