2 ms·
The general idea is to return all the same headers as a get, without the body, so that's likely correct. Unless there's code farther down that sends content le
by tyingq 10y ago
The general idea is to return all the same headers as a get, without the body, so that's likely correct.
Unless there's code farther down that sends content length, etags, etc. You would want to send those too. Though I don't know that it really matters much.
- shurcooL 10y agoMakes sense, thanks. Good point about Content-Length and ETag headers. So it sounds like one needs to do exactly the same amount of work to respond to a HEAD request as a GET request. Meaning the body still needs to be rendered (to calculate its length and hash). Just not include it in the response.