Fixed url parsing for unicode characters.

This commit is contained in:
Simon Sessingø
2017-08-23 21:04:11 +01:00
parent ea255baec3
commit 65c811356d
14 changed files with 41 additions and 32 deletions
+5 -5
View File
@@ -29,8 +29,8 @@ class Request
public function __construct()
{
$this->parseHeaders();
$this->host = $this->getHeader('http-host');
$this->uri = urldecode($this->getHeader('request-uri'));
$this->setHost($this->getHeader('http-host'));
$this->setUri(new Uri($this->getHeader('request-uri')));
$this->input = new Input($this);
$this->method = strtolower($this->input->get('_method', $this->getHeader('request-method'), 'post'));
}
@@ -58,7 +58,7 @@ class Request
}
/**
* @return string
* @return Uri
*/
public function getUri()
{
@@ -215,9 +215,9 @@ class Request
}
/**
* @param string $uri
* @param Uri $uri
*/
public function setUri($uri)
public function setUri(Uri $uri)
{
$this->uri = $uri;
}