本文介绍了带有HEAD请求的Content-Length标头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说明 HEAD 请求:

HEAD 请求的响应是否应包含 Content-Length 标头?它应该是在 GET 请求中返回的值,即使没有响应正文吗?或者Content-Length应该是0?

Should the response to a HEAD request contain a Content-Length header? Should it be the value which would be returned on a GET request, even if there is no response body? Or should the Content-Length be 0?

推荐答案

对我而言,它看起来像非常具体:

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

这篇关于带有HEAD请求的Content-Length标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-09 02:15
查看更多