Skip to content

Commit

Permalink
use parse_url
Browse files Browse the repository at this point in the history
  • Loading branch information
zweifisch committed Jan 18, 2014
1 parent 56067f8 commit 772c9a8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions zf/components/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ public function dispatch($method, $path)

public function run()
{
$path = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : $_SERVER['REQUEST_URI'];
if($pos = strpos($path, '?'))
{
$path = substr($path,0,$pos);
}
return $this->dispatch(strtoupper($_SERVER['REQUEST_METHOD']), $path);
return $this->dispatch($_SERVER['REQUEST_METHOD'], parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
}
}

0 comments on commit 772c9a8

Please sign in to comment.