Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Closed
wants to merge 1 commit into from
Closed

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Feb 12, 2013

WIP!

Tries to fix #6634. I also compared the methods with the changes done in the upstream ZF (where also some fixes happened).

@@ -76,7 +76,7 @@ public function provideServerVars()
),
'/app_dev.php',
'/app_dev.php',
'/',
'',
Copy link
Member

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 ?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@fabpot
Copy link
Member

fabpot commented Apr 11, 2013

@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.

@Tobion
Copy link
Contributor Author

Tobion commented Apr 11, 2013

I'm on it.

@Tobion
Copy link
Contributor Author

Tobion commented Apr 11, 2013

I have created #7632 for it.

@jakzal
Copy link
Contributor

jakzal commented Dec 23, 2013

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'
*
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems wrong

@fabpot
Copy link
Member

fabpot commented Dec 28, 2013

@Tobion Can close this one? Or do you have time to finish it?

@fabpot
Copy link
Member

fabpot commented Mar 26, 2014

Closing now as we have a related ticket.

@fabpot fabpot closed this Mar 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HttpFoundation] Request path can be wrong
5 participants