mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
Merge pull request #1 from matheusheiden/matheusheiden-patch-1
Set HTTP method before initializing InputHandler
This commit is contained in:
@@ -84,7 +84,8 @@ class Request
|
|||||||
|
|
||||||
// Check if special IIS header exist, otherwise use default.
|
// Check if special IIS header exist, otherwise use default.
|
||||||
$this->setUrl(new Url($this->getHeader('unencoded-url', $this->getHeader('request-uri'))));
|
$this->setUrl(new Url($this->getHeader('unencoded-url', $this->getHeader('request-uri'))));
|
||||||
|
|
||||||
|
$this->method = strtolower($this->getHeader('request-method'));
|
||||||
$this->inputHandler = new InputHandler($this);
|
$this->inputHandler = new InputHandler($this);
|
||||||
$this->method = strtolower($this->inputHandler->value('_method', $this->getHeader('request-method')));
|
$this->method = strtolower($this->inputHandler->value('_method', $this->getHeader('request-method')));
|
||||||
}
|
}
|
||||||
@@ -425,4 +426,4 @@ class Request
|
|||||||
return $this->data[$name] ?? null;
|
return $this->data[$name] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user