Commit 042a3bda by Scott

Support HEAD requests

Should use identical headers to GET but no body.
parent 7df10de7
......@@ -36,7 +36,13 @@ class Router
public function __construct()
{
$this->httpMethod = strtoupper($_SERVER['REQUEST_METHOD']);
$method = strtoupper($_SERVER['REQUEST_METHOD']);
// implicity support HEAD requests (PHP takes care of removing the response body for us)
if ($method === 'HEAD') {
$method = 'GET';
}
$this->httpMethod = $method;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment