Fix bug #74205 PATH_INFO only partial support - #2403
Conversation
|
Also fix https://bugs.php.net/74061 |
|
Looks like this was introduced in 8d46756, but it's not clear why, or how it is related to that change (which seems to be about slashes). |
|
Hmm... I see a case /img/bar.png should (perhaps) return a not found error.. will try to think if a better way is possible |
|
A mnimal fix, allowing dot not in final part is |
This reverts commit 9e942e5.
Fix bug #74061 Built-in server assumes path with dot is a file Add a -P (--redirect) option which allow to unconditionally redirect all not found file to index.php, with PATH_INFO set
|
After a bit more thinking on this, and lot of try I think we cannot have a safe way to known if you should redirect or not. Another exampple /foo/index.php/bar ? So, here is another proposal (which should be very simple)
This new option is designed to be a real equiv to Apache rules: See the new test for this change. |
|
Isn't |
|
@nikic not exactly, a possible router script will be (a bit ugly) BTW, the reason why I try to fix reported bug is that documentation states:
Which only works if no dot in called URI. The wording "URI request does not specify a file" is a bit confusing... |
|
@remicollet bump, can I ask that you either merge or close this as appropriate please ? |
|
Closing because this seems to have gone stale. Feel free to have another shot. |
I tried but failed to find why this "dot" breaks redirection, so I propose to clean it.
Notice: static files are managed in php_cli_server_dispatch
As this may introduce a behavior change, I only propose this for 7.2
Open for discussion.
See https://bugs.php.net/74205