Content-Length header with HEAD requests?

后端 未结 5 1837
情书的邮戳
情书的邮戳 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:39

    To me it looks like the HTTP 1.1 RFC is pretty specific:

    The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.

提交回复
热议问题