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

bug in PathVariables #535

Open
klgec opened this issue Mar 22, 2024 · 0 comments
Open

bug in PathVariables #535

klgec opened this issue Mar 22, 2024 · 0 comments
Labels

Comments

@klgec
Copy link

klgec commented Mar 22, 2024

the tokenized path variables are chopped by 1 char on both ends. /hello/{test} will make tokens: "ell" and "test".
this is why 1-char paths fail to even function, like: /b/a/{test}.

Fix:

if (key.startsWith("{") && key.endsWith("}"))
    key = key.substring(1, key.length() - 1);
@yanzhenjie yanzhenjie added the bug label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants