Hello. I'm trying to pass an email address in on my GET line and am having some issues where the TLD is getting stripped e.g., '.com' in joe@blow.test.com so it gets passed to me in my controller as 'joe@blow.test'.
I've tracked it down to 'input.php' lines 179-185:
// Strip the defined url suffix from the uri if needed
$uri_info = pathinfo($uri);
if ( ! empty($uri_info))
{
static::$detected_ext = $uri_info;
$uri = $uri_info.'/'.$uri_info;
}
The problem is that I'm not sure why this is being done and it doesn't look like there's any way to tell the input class to preserve the extension. I'm using fuel v1.2.1. I'm trying to build a REST controller that supports something like:
GET http://mysite.com/users/john@doe.com
-> returns user info
Thanks.
-Rick
FuelPHP is a segment driven framework, which means URL extensions don't have any meaning.
I understand that in this particular case it's an issue, but I haven't found a fool-proof way to detect when it is an extension, and when part of URI data.
If you always expect something to be present (like in this case), you can as a workaround use Input::extension() to get the stripped extension.