aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-10-30 16:02:09 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-10-30 16:02:09 +0100
commitb04675912eef9254ee4f4f0b48d197b335e59d5c (patch)
treec031e554854b5556f36b107f9e315896bf752d50
parenta7833b48a3ed179b12bfab4e25a0ed36d9d6735b (diff)
downloadRouter-b04675912eef9254ee4f4f0b48d197b335e59d5c.zip
Router-b04675912eef9254ee4f4f0b48d197b335e59d5c.tar.gz
Router-b04675912eef9254ee4f4f0b48d197b335e59d5c.tar.bz2
Decode URI for “complex” ones.
-rw-r--r--Http.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Http.php b/Http.php
index 4796764..f1bdca1 100644
--- a/Http.php
+++ b/Http.php
@@ -290,6 +290,8 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
}
else {
+ $uri = urldecode($uri);
+
if(false !== $pos = strpos($uri, '@'))
list($subdomain, $uri) = explode('@', $uri, 2);
else
@@ -665,7 +667,7 @@ class Http extends Generic implements \Hoa\Core\Parameter\Parameterizable {
throw new Exception(
'Cannot find URI so we cannot route.', 8);
- $uri = ltrim($_SERVER['REQUEST_URI'], '/');
+ $uri = ltrim(urldecode($_SERVER['REQUEST_URI']), '/');
if(false !== $pos = strpos($uri, '?'))
$uri = substr($uri, 0, $pos);