Content-Length header with HEAD requests?

后端 未结 5 1845
情书的邮戳
情书的邮戳 2020-11-27 14:45

The http spec says about the HEAD request:

The HEAD method is identical to GET except that the server MUST NOT return a message-body in t

5条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 15:16

    The HTTP-spec at W3C states:

    If the new field values indicate that the cached entity differs from the current entity (as would be indicated by a change in Content-Length, ...

    Which (to me) means it should hold the "correct" value as you would in a GET response.

提交回复
热议问题