Hacker News new | ask | show | jobs
by hk__2 3355 days ago
A server should respond with the same headers to a HEAD request as to a GET one.
2 comments

They should, but many good sites just don't, for whatever reason. Even ones you know are run by smart people:

  $ curl -I -X HEAD https://redis.io/
  HTTP/1.1 404 Not Found
For this app, being more forgiving is a better idea.
https://www.stumbleupon.com had a similar issue.
SHOULD and DOES are not the same thing.

Returning 405 'Method Not Allowed' on a HEAD isn't unreasonable, and that is the issue we are seeing.

EDIT: did say GET on prior edit.

> Returning 405 'Method Not Allowed' on a GET isn't unreasonable

I think you meant "on a HEAD".

er yes, my bad. Fixed