From 9092ee9f0e65d38a65ac1d506af65d06e5f86652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnulfo=20Sol=C3=ADs?= Date: Wed, 27 Jun 2018 07:25:25 +0200 Subject: [PATCH] HTTP Entity Headers (#1127) * introduced basic entity and hopbyhop header identification * removed entity headers * coding style fixes * remove unneeded header check * moved from bytes to unicode in headers * changed list to tuple in empty response statuses --- sanic/exceptions.py | 2 +- sanic/http.py | 128 +++++++++++++++++++++++++++++++++++++++++ sanic/response.py | 81 ++++---------------------- tests/test_response.py | 10 ++-- 4 files changed, 145 insertions(+), 76 deletions(-) create mode 100644 sanic/http.py diff --git a/sanic/exceptions.py b/sanic/exceptions.py index 6da747f2..25dbd47d 100644 --- a/sanic/exceptions.py +++ b/sanic/exceptions.py @@ -1,4 +1,4 @@ -from sanic.response import STATUS_CODES +from sanic.http import STATUS_CODES TRACEBACK_STYLE = '''