Finished X-Ray + fixed routing bug
This commit is contained in:
parent
7ea4d8c3e6
commit
0bd3899cb3
6 changed files with 179 additions and 53 deletions
|
|
@ -178,8 +178,7 @@ class BaseResponse(_TemplateEnvironmentMixin):
|
|||
self.setup_class(request, full_url, headers)
|
||||
return self.call_action()
|
||||
|
||||
def call_action(self):
|
||||
headers = self.response_headers
|
||||
def _get_action(self):
|
||||
action = self.querystring.get('Action', [""])[0]
|
||||
if not action: # Some services use a header for the action
|
||||
# Headers are case-insensitive. Probably a better way to do this.
|
||||
|
|
@ -188,7 +187,11 @@ class BaseResponse(_TemplateEnvironmentMixin):
|
|||
if match:
|
||||
action = match.split(".")[-1]
|
||||
|
||||
action = camelcase_to_underscores(action)
|
||||
return action
|
||||
|
||||
def call_action(self):
|
||||
headers = self.response_headers
|
||||
action = camelcase_to_underscores(self._get_action())
|
||||
method_names = method_names_from_class(self.__class__)
|
||||
if action in method_names:
|
||||
method = getattr(self, action)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue