diff options
| author | 2018-12-08 09:00:12 +0000 | |
|---|---|---|
| committer | 2018-12-08 09:00:12 +0000 | |
| commit | 9bef4b7df1464043fa139f0f046c725980e3577e (patch) | |
| tree | bbc48966bea2d2ecf054a632889acac372a76fc9 /modules/rest_api.py | |
| parent | Check whether we actually have a httpd running when unloading rest_api.py (diff) | |
Switch to using a case insensitive dictionary for headers instead of doing
.title() on each header key
Diffstat (limited to 'modules/rest_api.py')
| -rw-r--r-- | modules/rest_api.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
