summaryrefslogtreecommitdiff
path: root/pecan/rest.py
diff options
context:
space:
mode:
authorRyan Petrello <lists@ryanpetrello.com>2014-04-23 15:18:37 -0700
committerRyan Petrello <lists@ryanpetrello.com>2014-04-23 15:35:30 -0700
commit7e6e3fc8766d6331165e1a06f163a90e579b1d03 (patch)
treeb2a9d88eff89db6a61f762379bd5a39098699547 /pecan/rest.py
parent5ede5e03572c873ff533ef9c2c0db5f92a8bc6ce (diff)
downloadpecan-7e6e3fc8766d6331165e1a06f163a90e579b1d03.tar.gz
Work around another obscure RestController edge case that should raise a 404.
Fixes bug 1311147 Change-Id: I3dd0986c458902b03ed140872fc1938b06e75f4b
Diffstat (limited to 'pecan/rest.py')
-rw-r--r--pecan/rest.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pecan/rest.py b/pecan/rest.py
index 881de79..db955c5 100644
--- a/pecan/rest.py
+++ b/pecan/rest.py
@@ -176,6 +176,12 @@ class RestController(object):
if not remainder or remainder == ['']:
controller = self._find_controller('get_all', 'get')
if controller:
+ argspec = getargspec(controller)
+ fixed_args = len(argspec.args[1:]) - len(
+ request.pecan.get('routing_args', [])
+ )
+ if len(remainder) < fixed_args:
+ abort(404)
return controller, []
abort(404)