From 9918a72f80d2fb529ab6789a4651273680eff52c Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 6 Dec 2018 12:03:58 +0000 Subject: [PATCH] .items() on self.headers, to correctly use it for a dict comprehension (rest_api.py) --- modules/rest_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rest_api.py b/modules/rest_api.py index ca1ee79f..ecba53f3 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} + headers = {key.title(): value for key, value in self.headers.items()} response = "" code = 404