-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,9 +23,9 @@ public function testUriMethods($server, $expectedRequestUri, $expectedBaseUrl, $ | |
$request = new ApacheRequest(); | ||
$request->server->replace($server); | ||
|
||
$this->assertEquals($expectedRequestUri, $request->getRequestUri(), '->getRequestUri() is correct'); | ||
$this->assertEquals($expectedBaseUrl, $request->getBaseUrl(), '->getBaseUrl() is correct'); | ||
$this->assertEquals($expectedPathInfo, $request->getPathInfo(), '->getPathInfo() is correct'); | ||
$this->assertSame($expectedRequestUri, $request->getRequestUri(), '->getRequestUri() is correct'); | ||
$this->assertSame($expectedBaseUrl, $request->getBaseUrl(), '->getBaseUrl() is correct'); | ||
$this->assertSame($expectedPathInfo, $request->getPathInfo(), '->getPathInfo() is correct'); | ||
} | ||
|
||
public function provideServerVars() | ||
|
@@ -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 commentThe 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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are not the same if there is a base path. |
||
), | ||
array( | ||
array( | ||
|
@@ -87,6 +87,24 @@ public function provideServerVars() | |
'', | ||
'/', | ||
), | ||
array( | ||
array( | ||
'REQUEST_URI' => '/symfony/app.php/', | ||
'SCRIPT_NAME' => '/symfony/app.php', | ||
), | ||
'/symfony/app.php/', | ||
'/symfony/app.php', | ||
'/', | ||
), | ||
array( | ||
array( | ||
'REQUEST_URI' => '/symfony?foo=/symfony/index.php', | ||
'SCRIPT_NAME' => '/symfony/index.php', | ||
), | ||
'/symfony?foo=/symfony/index.php', | ||
'/symfony', | ||
'', | ||
), | ||
); | ||
} | ||
} |
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