]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Remove needless whitespace strips (#1048)
authorTaneli Hukkinen <hukkinj1@users.noreply.github.com>
Sun, 5 Jul 2020 09:58:44 +0000 (12:58 +0300)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2020 09:58:44 +0000 (11:58 +0200)
httpx/_auth.py
httpx/_config.py

index e2278434ad98ba1a966592b9f6769accb20f0c81..ab430973c77e21ac708961989cc26c8b2e239110 100644 (file)
@@ -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}"
 
 
index 96c2270211fce7d4f8945ea822deb9b21fdf309a..b50acb2321ce5cbb877f3257b44a8d4c9ea71411 100644 (file)
@@ -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: