in the 163 commit, the following test has been added to fix the issue 71 :
if (strpos($_SERVER['REQUEST_URI'], "://") === false) {
$uri = $_SERVER['REQUEST_URI'];
}
else {
$uri = sprintf('%s://%s%s', $proto, $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI']);
}
but if strpos($_SERVER['REQUEST_URI'], "://") is false (and even if it's 0, not
sure than this is really the good test to perform), the builded uri will be
wrong, just test this part of code with following values :
$proto='http';
$_SERVER['HTTP_HOST'] = 'example.com';
$_SERVER['REQUEST_URI'] = '/foo';
$uri will be /foo
$proto='http';
$_SERVER['HTTP_HOST'] = 'example.com';
$_SERVER['REQUEST_URI'] = 'http://example.com/foo';
$uri will be http://example.comhttp://example.com/foo
if you update the test to : if (strpos($_SERVER['REQUEST_URI'], "://") !==
false), in both tests, uri will be http://example.com/foo
Original issue reported on code.google.com by bisounou...@gmail.com on 24 Nov 2010 at 9:32
Original issue reported on code.google.com by
bisounou...@gmail.com
on 24 Nov 2010 at 9:32