From 4a68baa0a6c47ede108c44e69a07e23e256ffbea Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 8 Feb 2019 21:56:58 +0000 Subject: [PATCH] Return `path` from `_path_data()` (rest_api.py) --- modules/rest_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rest_api.py b/modules/rest_api.py index 2bdcb254..a3bab0b5 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -15,7 +15,7 @@ class Handler(http.server.BaseHTTPRequestHandler): _, _, endpoint = path[1:].partition("/") endpoint, _, args = endpoint.partition("/") args = list(filter(None, args.split("/"))) - return endpoint, args + return path, endpoint, args def _url_params(self): parsed = urllib.parse.urlparse(self.path) @@ -27,7 +27,7 @@ class Handler(http.server.BaseHTTPRequestHandler): return self.rfile.read(content_length) def _handle(self, method): - endpoint, args = self._path_data() + path, endpoint, args = self._path_data() headers = utils.CaseInsensitiveDict(dict(self.headers.items())) params = self._url_params() data = self._body()