summaryrefslogtreecommitdiff
path: root/modules/language/python/module/http/client.py
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-09-11 20:49:02 +0200
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-09-11 20:49:02 +0200
commitc75be2215da7dcc993ca8450bafcbab609132871 (patch)
tree02dd34ba28787b8d98ad50433c41339639d60cfc /modules/language/python/module/http/client.py
parentf75533465dbe70b153c75c85297422964b1a598d (diff)
final hhtp code
Diffstat (limited to 'modules/language/python/module/http/client.py')
-rw-r--r--modules/language/python/module/http/client.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/language/python/module/http/client.py b/modules/language/python/module/http/client.py
index 8dd6028..8f152f6 100644
--- a/modules/language/python/module/http/client.py
+++ b/modules/language/python/module/http/client.py
@@ -105,9 +105,9 @@ globals().update(http.HTTPStatus.__members__)
# another hack to maintain backwards compatibility
# Mapping status codes to official W3C names
-pk(6)
+
responses = {v: v.phrase for v in http.HTTPStatus.__members__.values()}
-pk(7)
+
# maximal amount of data to read at one time in _safe_read
MAXAMOUNT = 1048576
@@ -147,7 +147,6 @@ _is_illegal_header_value = re.compile(rb'\n(?![ \t])|\r(?![ \t\n])').search
# servers will otherwise respond with a 411
_METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'}
-pk(8)
def _encode(data, name='data'):
"""Call data.encode("latin-1") but show a better error message."""
try: