Uri::current(), Uri::main() drop trailing slash
Uri::current() and Uri::main() (I'm not sure what the difference between these functions are) both drop the trailing slash from the URL.
calling: Uri::current() or Uri::main() from
http://example.com/controller/method/
returns http://example.com/controller/method
a couple of things I should have mentioned. I'm running nginx and in my config, base_url = null. I'm looking into what might be causing this...
Uri::main() returns the requested Uri from the browser, Uri::current() returns the requested Uri fromt the current active request object - which is the same in the main request but may differ in a HMVC request as is explained in the docs.
The returned Uri is based on what PHP tells Fuel, if PHP says there's no trailing slash than that's all Fuel knows.
echo Uri::main(); echo Input::protocol() . '://' . $_SERVER['HTTP_HOST'] .'/'. $_SERVER['REQUEST_URI'];
http://example.com/subpage http://example.com/subpage/
Should have checked, the trailing slash is trimmed by the Uri class.
I'm having a hard time finding a solution to this that doesn't look like an ugly hack. Would you mind reopening this?
You just opened #441 about this, if that's resolved (thus the trailing slash is consistantly trimmed) this isn't an issue anymore.
I don't think it's the same issue
The trailing slash should be ignored by the system, with or without should be the same Uri. We chose without as the default. Thus the dropped trailing slash isn't the issue, the issue is that it apparently matters, which you just reported in #441.