Change BaseResponse action parsing to be a bit more generic.
Some service like SWF have action headers like com.amazonaws.swf.service.model.SimpleWorkflowService.<action>. By using -1 instead of 1, we can accomodate both scenarios.
This commit is contained in:
parent
e8828f9787
commit
32dd72f6b7
@ -142,7 +142,7 @@ class BaseResponse(_TemplateEnvironmentMixin):
|
||||
# Headers are case-insensitive. Probably a better way to do this.
|
||||
match = self.headers.get('x-amz-target') or self.headers.get('X-Amz-Target')
|
||||
if match:
|
||||
action = match.split(".")[1]
|
||||
action = match.split(".")[-1]
|
||||
|
||||
action = camelcase_to_underscores(action)
|
||||
method_names = method_names_from_class(self.__class__)
|
||||
|
Loading…
Reference in New Issue
Block a user