Skip to content

Commit

Permalink
Merge pull request #2177 from akrabat/revert-1946
Browse files Browse the repository at this point in the history
Revert #1946 - BugFix URL Encoding
  • Loading branch information
geggleto committed Mar 19, 2017
2 parents 30888b9 + 28e9044 commit 8b6005c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion Slim/Http/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ public static function createFromEnvironment(Environment $env)
// parse_url() requires a full URL. As we don't extract the domain name or scheme,
// we use a stand-in.
$requestUri = parse_url('http://example.com' . $env->get('REQUEST_URI'), PHP_URL_PATH);
$requestUri = rawurldecode($requestUri);

$basePath = '';
$virtualPath = $requestUri;
Expand Down
14 changes: 0 additions & 14 deletions tests/Http/UriTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,20 +562,6 @@ public function testCreateEnvironmentWithBasePath()
$this->assertEquals('http://localhost/foo/bar', (string) $uri);
}

public function testCreateEnvironmentWithBasePathContainingSpace()
{
$environment = Environment::mock([
'SCRIPT_NAME' => "/f'oo bar/index.php",
'REQUEST_URI' => "/f'oo%20bar/baz",
]);
$uri = Uri::createFromEnvironment($environment);

$this->assertEquals("/f%27oo%20bar", $uri->getBasePath());
$this->assertEquals('baz', $uri->getPath());

$this->assertEquals('http://localhost/f%27oo%20bar/baz', (string) $uri);
}

public function testGetBaseUrl()
{
$environment = Environment::mock([
Expand Down

0 comments on commit 8b6005c

Please sign in to comment.