.items() on self.headers, to correctly use it for a dict comprehension

(rest_api.py)
This commit is contained in:
jesopo 2018-12-06 12:03:58 +00:00
parent 786e8b89a3
commit 9918a72f80

View file

@ -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