Finished X-Ray + fixed routing bug

This commit is contained in:
Terry Cain 2017-09-23 11:02:25 +01:00
commit 0bd3899cb3
No known key found for this signature in database
GPG key ID: 14D90844E4E9B9F3
6 changed files with 179 additions and 53 deletions

View file

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