|
|
@ -105,10 +105,11 @@ class Router
|
|
|
|
[$method, $url] = explode(' ', $url, 2);
|
|
|
|
[$method, $url] = explode(' ', $url, 2);
|
|
|
|
$url = trim($url);
|
|
|
|
$url = trim($url);
|
|
|
|
$methods = explode('|', $method);
|
|
|
|
$methods = explode('|', $method);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (in_array('GET', $methods) && !in_array('HEAD', $methods)) {
|
|
|
|
// Add head requests to get methods, should they come in as a get request
|
|
|
|
$methods[] = 'HEAD';
|
|
|
|
if (in_array('GET', $methods, true) === true && in_array('HEAD', $methods, true) === false) {
|
|
|
|
|
|
|
|
$methods[] = 'HEAD';
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// And this finishes it off.
|
|
|
|
// And this finishes it off.
|
|
|
|