From bd526452a8b0e9cbca57440bfd29f54271e509a6 Mon Sep 17 00:00:00 2001 From: abastardi Date: Fri, 13 Jan 2017 15:52:42 -0500 Subject: [PATCH] Fix router functions check When the router checks whether the requested route matches a function in the functions list, it does not strip the extension, causing failures for URLs with extensions. This change strips the extension before comparing to the list of functions. --- gluon/rewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/rewrite.py b/gluon/rewrite.py index fc4d1153..1fef465a 100644 --- a/gluon/rewrite.py +++ b/gluon/rewrite.py @@ -1040,7 +1040,7 @@ class MapUrlIn(object): else: default_function = self.router.default_function # str or None default_function = self.domain_function or default_function - if not arg0 or functions and arg0 not in functions: + if not arg0 or functions and arg0.split('.')[0] not in functions: self.function = default_function or "" self.pop_arg_if(arg0 and self.function == arg0) else: