Permalink
Browse files

Don't try to use query_string to determine request_uri() if

it doesn't looks like a proper route

Query string can be used to determine routing when used this
way :

 http://test/index.php?/route

However, this method consume GET arguments even if query string
is not intended to be used for routing. To fix that, we don't
even try to use query string for routing if query string doesn't
starts with /.
  • Loading branch information...
sloonz committed Feb 28, 2012
1 parent a4d61ad commit 5eaebb7f5c8945f4b86f65851b3450197b6cc339
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/limonade.php
View
@@ -1044,7 +1044,7 @@ function request_uri($env = null)
$uri = $path_info;
}
// No PATH_INFO?... What about QUERY_STRING?
- elseif (trim($query_string, '/') != '')
+ elseif (trim($query_string, '/') != '' && $query_string[0] == '/')
{
$uri = $query_string;
$get = $env['GET'];

0 comments on commit 5eaebb7

Please sign in to comment.