-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WIP][HttpFoundation] fix pathinfo #7053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -76,7 +76,7 @@ public function provideServerVars() | |||
), | |||
'/app_dev.php', | |||
'/app_dev.php', | |||
'/', | |||
'', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it a BC break ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That's why I'm not sure about the direction to fix it yet. This is probably the "right" way because the pathinfo of /app.php
is empty and not /
. This also how CGI and PHP ($_SERVER) behaves. But it would require other changes to UrlMatching for example, so that it treats ''
and '/'
the same. So I'm not sure it's the way to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''
and /
are technically the same URL as ''
does not really make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not the same if there is a base path. /app_dev.php != /app_dev.php/
. That's the problem exactly.
@Tobion Can you open a PR with just the fixes from ZF? Or if you don't have time, I can do that myself but as there are several other tickets/PRs on the same topic, I'd like to act fast. Thanks. |
I'm on it. |
I have created #7632 for it. |
Might be related: #7616 |
@@ -735,6 +733,8 @@ public function getScriptName() | |||
* * http://localhost/mysite/enco%20ded returns '/enco%20ded' | |||
* * http://localhost/mysite/about?var=1 returns '/about' | |||
* | |||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems wrong
@Tobion Can close this one? Or do you have time to finish it? |
Closing now as we have a related ticket. |
WIP!
Tries to fix #6634. I also compared the methods with the changes done in the upstream ZF (where also some fixes happened).