Checking the availability of a server resource
This note provides supplementary information about the server's implementation of the standard HTTP HEAD method which is used to check resource availability.
HEAD method is the nearly-identical twin to the
GET method, performing all of the same processing steps, but without actually sending any data in the response payload. Crawlers often issue
HEAD requests as a surrogate when checking to see if a resource is available.
The server's request/response cycle for
HEAD requests is handled by this sequence:
|1||Server Name Indication||no||no|
|17||If Modified Since||no||no|
|21||Content Encoding †||yes||yes|
|22||Content Length ‡||no||no|
accept-rangesheader to the response in order to inform the caller that
rangerequests are allowed. † Content encoding is performed with
HEADrequests, if necessary, and the compressed file is saved to the encoding-cache for subsequent calls; the
content-lengthheader reflects the compressed file size. ‡ The
content-lengthresponse header is the number of bytes that would be sent if this were a
GETrequest; the response payload itself, in a
HEADrequest, is always empty.