]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Remove .encode("ascii") call from null byte (#1037)
authorTaneli Hukkinen <hukkinj1@users.noreply.github.com>
Mon, 29 Jun 2020 21:15:22 +0000 (00:15 +0300)
committerGitHub <noreply@github.com>
Mon, 29 Jun 2020 21:15:22 +0000 (23:15 +0200)
httpx/_utils.py

index 89ded267b23ee52f3734cd2628692a5b641711cc..e38a662a2f7448a9d955fa0d81275c3096b84cf0 100644 (file)
@@ -94,7 +94,7 @@ def format_form_param(name: str, value: typing.Union[str, bytes]) -> bytes:
 
 
 # Null bytes; no need to recreate these on each call to guess_json_utf
-_null = "\x00".encode("ascii")  # encoding to ASCII for Python 3
+_null = b"\x00"
 _null2 = _null * 2
 _null3 = _null * 3