From 9bef4b7df1464043fa139f0f046c725980e3577e Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 8 Dec 2018 09:00:12 +0000 Subject: Switch to using a case insensitive dictionary for headers instead of doing .title() on each header key --- modules/rest_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/rest_api.py') diff --git a/modules/rest_api.py b/modules/rest_api.py index f558efca..2914f5d3 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -14,7 +14,7 @@ class Handler(http.server.BaseHTTPRequestHandler): _, _, endpoint = path[1:].partition("/") endpoint, _, args = endpoint.partition("/") args = list(filter(None, args.split("/"))) - headers = {key.title(): value for key, value in self.headers.items()} + headers = utils.CaseInsensitiveDict(dict(self.headers.items())) response = "" code = 404 -- cgit v1.3.1-10-gc9f91