Content-Length 是一个实体消息首部,用来指明发送给接收方的消息主体的大小,即用十进制数字表示的八位元组的数目。

Header type Entity header
Forbidden header name yes

语法

Content-Length: <length>

指令

<length>
消息的长度,用十进制数字表示的八位字节的数目。

规范

Specification Title
RFC 7230, section 3.3.2: Content-Length Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support

相关内容

文档标签和贡献者

此页面的贡献者: rascalquan, WayneCui
最后编辑者: rascalquan,