Index: Zend/Controller/Router/Route/Regex.php =================================================================== --- Zend/Controller/Router/Route/Regex.php (revision 10133) +++ Zend/Controller/Router/Route/Regex.php (working copy) @@ -68,7 +68,7 @@ */ public function match($path) { - $path = trim(urldecode($path), '/'); + $path = trim(urldecode($path), self::URI_DELIMITER); $res = preg_match($this->_regex, $path, $values); if ($res === 0) return false; Index: Zend/Controller/Router/Route/Interface.php =================================================================== --- Zend/Controller/Router/Route/Interface.php (revision 10133) +++ Zend/Controller/Router/Route/Interface.php (working copy) @@ -29,6 +29,8 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ interface Zend_Controller_Router_Route_Interface { + const URI_DELIMITER = '/'; + public function match($path); public function assemble($data = array()); public static function getInstance(Zend_Config $config); Index: Zend/Controller/Router/Route/Module.php =================================================================== --- Zend/Controller/Router/Route/Module.php (revision 10182) +++ Zend/Controller/Router/Route/Module.php (working copy) @@ -42,11 +42,6 @@ class Zend_Controller_Router_Route_Module implements Zend_Controller_Router_Route_Interface { /** - * URI delimiter - */ - const URI_DELIMITER = '/'; - - /** * Default values for the route (ie. module, controller, action, params) * @var array */ @@ -221,20 +216,20 @@ unset($params[$this->_actionKey]); foreach ($params as $key => $value) { - $url .= '/' . $key; - $url .= '/' . $value; + $url .= self::URI_DELIMITER . $key; + $url .= self::URI_DELIMITER . $value; } if (!empty($url) || $action !== $this->_defaults[$this->_actionKey]) { - $url = '/' . $action . $url; + $url = self::URI_DELIMITER . $action . $url; } if (!empty($url) || $controller !== $this->_defaults[$this->_controllerKey]) { - $url = '/' . $controller . $url; + $url = self::URI_DELIMITER . $controller . $url; } if (isset($module)) { - $url = '/' . $module . $url; + $url = self::URI_DELIMITER . $module . $url; } return ltrim($url, self::URI_DELIMITER); Index: Zend/Controller/Router/Route/Static.php =================================================================== --- Zend/Controller/Router/Route/Static.php (revision 10133) +++ Zend/Controller/Router/Route/Static.php (working copy) @@ -33,8 +33,7 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Controller_Router_Route_Static implements Zend_Controller_Router_Route_Interface -{ - +{ protected $_route = null; protected $_defaults = array(); @@ -57,7 +56,7 @@ */ public function __construct($route, $defaults = array()) { - $this->_route = trim($route, '/'); + $this->_route = trim($route, self::URI_DELIMITER); $this->_defaults = (array) $defaults; } @@ -70,7 +69,7 @@ */ public function match($path) { - if (trim($path, '/') == $this->_route) { + if (trim($path, self::URI_DELIMITER) == $this->_route) { return $this->_defaults; } return false;