Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #562 from hans-d/error_uri_colon

Request->_url gives wrong url for request_uri like controller/test:1
  • Loading branch information...
commit 5e4838529a4ff45c87319c80b481919272872d0f 2 parents 86ec504 + 9ee2496
@nateabele nateabele authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 tests/cases/action/RequestTest.php
View
17 tests/cases/action/RequestTest.php
@@ -177,6 +177,23 @@ public function testRequestWithoutUrlQueryParam() {
$this->assertEqual('pages/test_app', $request->url);
}
+ public function testRequestWithColon() {
+ unset($_GET['url']);
+ $request = new Request(array('env' => array(
+ 'PHP_SELF' => '/test_app/app/webroot/index.php',
+ 'REQUEST_URI' => '/test_app/pages/test_app/test:a'
+ )));
+ $this->assertEqual('/test_app', $request->env('base'));
+ $this->assertEqual('pages/test_app/test:a', $request->url);
+
+ $request = new Request(array('env' => array(
+ 'PHP_SELF' => '/test_app/app/webroot/index.php',
+ 'REQUEST_URI' => '/test_app/pages/test_app/test:1'
+ )));
+ $this->assertEqual('/test_app', $request->env('base'));
+ $this->assertEqual('pages/test_app/test:1', $request->url);
+ }
+
public function testRequestWithoutUrlQueryParamAndNoApp() {
unset($_GET['url']);
$request = new Request(array('env' => array(
Please sign in to comment.
Something went wrong with that request. Please try again.