.items() on self.headers, to correctly use it for a dict comprehension
(rest_api.py)
This commit is contained in:
parent
786e8b89a3
commit
9918a72f80
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue