From c75be2215da7dcc993ca8450bafcbab609132871 Mon Sep 17 00:00:00 2001 From: Stefan Israelsson Tampe Date: Tue, 11 Sep 2018 20:49:02 +0200 Subject: final hhtp code --- modules/language/python/module/http/client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/language/python/module/http/client.py') 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: -- cgit v1.2.3