gpt4 book ai didi

php - 动态网页是否总是在 HTTP header 中包含内容长度字段?

转载 作者:可可西里 更新时间:2023-11-01 16:27:19 25 4
gpt4 key购买 nike

CGI、PHP、ASP、SSI 等动态页面是否始终在 HTTP header 中包含内容长度字段。如果不是为什么?请提供指向服务器上托管的网页的链接,这些网页不包含 header 中的 Content-Length 字段。我想亲眼看看。

最佳答案

根据 RFC 2616:

In HTTP, it SHOULD be sent whenever the message's length can be determined prior to being transferred,

通常情况下无法事先确定长度。如果您想查看标题,请尝试 curl -I <a href="http://www.example.com" rel="noreferrer noopener nofollow">http://www.example.com</a> .您很快就会发现有些网站支持,有些网站不支持。

关于php - 动态网页是否总是在 HTTP header 中包含内容长度字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5598231/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com