-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Journey scanner fails to recognise sub-delims pchars #17212
Comments
Yep. We just need to change the scanner. |
Just created a PR to fix this issue in Journey. The "(" and ")" cases are not handled since I was not sure of how to do it nicely. |
The scanner in Journey fails to recognize routes that use literals from the sub-delims section of RFC 3986. This commit enhance the compatibility of Journey with the RFC by adding support of authorized delimiters to the scanner. Fix rails#17212
PR now provide compatibility with all sub-delims listed in RFC |
Hello, we have noticed that this change has lead to a change in behaviour of routing. It's a bit of an edge case which wasn't documented, so I'm just noting this here in case others encounter the same issue. in rails 4.1.11 the route Therefore it's no longer possible to use the 'wildcard segment' matching except at the start of a url or a We are relying on this behaviour in a current rails 4.1.11 app, you can see the routing code here https://github.com/alphagov/content-store/blob/master/config/routes.rb Since this functionality was undocumented, I don't feel like this should be considered a regression. However, I wonder if it would be valuable to characterise this behaviour in a test case. I'd be happy to submit a PR for that if others think it would be a good idea? Thanks David |
@heathd no, I'd still consider this a regression how ever much of an edge case this is - I'll have a look at it. |
@pixeltrix ok thanks |
The scanner in Journey fails to recognise routes that use literals from the sub-delims section of RFC 3986
The simple solution is to add the additional chars to the regexp in the scanner but there's the issue that
:
and()
are in the sub-delims so we should probably allow their use via escaping and to do that I think we need to change the behaviour of a:LITERAL
node.@tenderlove any comments/suggestions?
The text was updated successfully, but these errors were encountered: