Skip to content

Commit 8b6005c

Browse files
authored
Merge pull request #2177 from akrabat/revert-1946
Revert #1946 - BugFix URL Encoding
2 parents 30888b9 + 28e9044 commit 8b6005c

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

Slim/Http/Uri.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ public static function createFromEnvironment(Environment $env)
203203
// parse_url() requires a full URL. As we don't extract the domain name or scheme,
204204
// we use a stand-in.
205205
$requestUri = parse_url('http://example.com' . $env->get('REQUEST_URI'), PHP_URL_PATH);
206-
$requestUri = rawurldecode($requestUri);
207206

208207
$basePath = '';
209208
$virtualPath = $requestUri;

tests/Http/UriTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -562,20 +562,6 @@ public function testCreateEnvironmentWithBasePath()
562562
$this->assertEquals('http://localhost/foo/bar', (string) $uri);
563563
}
564564

565-
public function testCreateEnvironmentWithBasePathContainingSpace()
566-
{
567-
$environment = Environment::mock([
568-
'SCRIPT_NAME' => "/f'oo bar/index.php",
569-
'REQUEST_URI' => "/f'oo%20bar/baz",
570-
]);
571-
$uri = Uri::createFromEnvironment($environment);
572-
573-
$this->assertEquals("/f%27oo%20bar", $uri->getBasePath());
574-
$this->assertEquals('baz', $uri->getPath());
575-
576-
$this->assertEquals('http://localhost/f%27oo%20bar/baz', (string) $uri);
577-
}
578-
579565
public function testGetBaseUrl()
580566
{
581567
$environment = Environment::mock([

0 commit comments

Comments
 (0)