From: Taneli Hukkinen Date: Sun, 5 Jul 2020 09:58:44 +0000 (+0300) Subject: Remove needless whitespace strips (#1048) X-Git-Tag: 0.14.0~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f0e0480da43330f6e6dc3aac0457cb5e6ab8470;p=thirdparty%2Fhttpx.git Remove needless whitespace strips (#1048) --- 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: