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.