nicholas
nicholas copied to clipboard
HEAD requests generate 404
Currently, any HEAD request on a post's (slug) URL will return HTTP/404 Not found.
This seems to be related to the request routing code, e.g.
$router->map('GET','/[:slug]/', function($slug) {
I can change this to read GET|HEAD instead, and it actually generates HTTP/200 for HEAD requests then, but it does also output Content-Length: 0 in this case, which is wrong. It's still better than returning a 404, but clearly not the correct fix.
Is there an easy way to generate proper HEAD responses in nicholas?
TIA!