mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 11:42:13 +00:00
@@ -30,7 +30,10 @@ class Request
|
|||||||
{
|
{
|
||||||
$this->parseHeaders();
|
$this->parseHeaders();
|
||||||
$this->setHost($this->getHeader('http-host'));
|
$this->setHost($this->getHeader('http-host'));
|
||||||
$this->setUri(new Uri($this->getHeader('request-uri')));
|
|
||||||
|
// Check if special IIS header exist, otherwise use default.
|
||||||
|
$this->setUri(new Uri($this->getHeader('unencoded-url', $this->getHeader('request-uri'))));
|
||||||
|
|
||||||
$this->input = new Input($this);
|
$this->input = new Input($this);
|
||||||
$this->method = strtolower($this->input->get('_method', $this->getHeader('request-method'), 'post'));
|
$this->method = strtolower($this->input->get('_method', $this->getHeader('request-method'), 'post'));
|
||||||
}
|
}
|
||||||
@@ -164,7 +167,7 @@ class Request
|
|||||||
*/
|
*/
|
||||||
public function getHeader($name, $defaultValue = null)
|
public function getHeader($name, $defaultValue = null)
|
||||||
{
|
{
|
||||||
if (isset($this->headers[strtolower($name)])) {
|
if (array_key_exists(strtolower($name), $this->headers) === true) {
|
||||||
return $this->headers[strtolower($name)];
|
return $this->headers[strtolower($name)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user