You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very nice work. When using you lib, i found what it seems like a little problem.
I have a dot in my url, and altorouter doesn't seems to find a match (for example if you want to have he version of your api in the url => https://api/1.1/user.json).
This mean the regex will stop at the character "/" or "." the dot is surely used when there is an extension in the uri.
But if you read the documentation :
[:action] // Match anything up to the next / or end of the URI as 'action'
It doesn't say the dot will be used in the matching process.
I think the empty regex should be : '[^/]++' to just stop at the end of the line or at the next slash.
Am i missing something ?
The text was updated successfully, but these errors were encountered:
yes probably an error in the documentation, but this should be clarified.
Thank you for the piece of code, i made a router using Altorouter and i have already modified the code the change the regex.
Hi,
Very nice work. When using you lib, i found what it seems like a little problem.
I have a dot in my url, and altorouter doesn't seems to find a match (for example if you want to have he version of your api in the url => https://api/1.1/user.json).
i used the empty match type regex for the id :
$router->map('GET','/users/[:id]', 'users#show', 'users_show');
But it looks like the dot is not working because the empty match type regex is : '[^/\.]++' https://github.com/dannyvankooten/AltoRouter/blob/master/AltoRouter.php#L29
This mean the regex will stop at the character "/" or "." the dot is surely used when there is an extension in the uri.
But if you read the documentation :
[:action] // Match anything up to the next / or end of the URI as 'action'
It doesn't say the dot will be used in the matching process.
I think the empty regex should be : '[^/]++' to just stop at the end of the line or at the next slash.
Am i missing something ?
The text was updated successfully, but these errors were encountered: