Drop NBSP characters (#1389)

This commit is contained in:
Tom Christie 2020-11-13 12:38:03 +00:00 committed by GitHub
parent f8f543057a
commit 16f41a2baa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1473,7 +1473,7 @@ class Cookies(MutableMapping):
def info(self) -> email.message.Message:
info = email.message.Message()
for key, value in self.response.headers.multi_items():
#  Note that setting `info[key]` here is an "append" operation,
# Note that setting `info[key]` here is an "append" operation,
# not a "replace" operation.
# https://docs.python.org/3/library/email.compat32-message.html#email.message.Message.__setitem__
info[key] = value

View File

@ -139,7 +139,7 @@ class codes(IntEnum):
NETWORK_AUTHENTICATION_REQUIRED = 511, "Network Authentication Required"
#  Include lower-case styles for `requests` compatibility.
# Include lower-case styles for `requests` compatibility.
for code in codes:
setattr(codes, code._name_.lower(), int(code))