Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom routing breaks in case of a dot in the custom route #1164

Closed
ipolevoy opened this issue Nov 3, 2021 · 1 comment
Closed

Custom routing breaks in case of a dot in the custom route #1164

ipolevoy opened this issue Nov 3, 2021 · 1 comment

Comments

@ipolevoy
Copy link
Member

ipolevoy commented Nov 3, 2021

Example RouteConfig:

public void init(AppContext appContext) {
   strictMode();
   route("/*path").to(Main1Controller.class).action("index");
}

Controller:

public class Main1Controller extends AppController {
    public void index(){

    }
}

Example URI: /access/one.two.three

 generates this error: 
Failed to render template: '/main_1/index.ftl.three.ftl' 

As you can see, the name of the template is guessed incorrectly.

Expected behavior:
Since this is a a custom route, the framework needs to simply pass the custom segment as a param1st() and params(), as well as param("path") and not try to interpret the template name, but rather needs to default to index.ftl.

@ipolevoy
Copy link
Member Author

ipolevoy commented Nov 3, 2021

fixed and a new snapshot deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant