V2EX  ›  英汉词典

Content-Length

释义 Definition

Content-Length:HTTP 报文头字段,表示消息体(body)的字节长度(十进制)。常用于让接收方知道需要读取多少字节;在某些情况下会被 Transfer-Encoding: chunked 等机制取代或影响其使用。(该词也可泛指“内容长度”,但最常见语境是 HTTP 头。)

发音 Pronunciation (IPA)

/ˈkɑn.tent lɛŋkθ/

例句 Examples

The server returned a Content-Length of 512.
服务器返回的 Content-Length 是 512。

If Content-Length is wrong, the client may hang while waiting for more data or stop early and truncate the response.
如果 Content-Length 不正确,客户端可能会在等待更多数据时卡住,或过早停止从而截断响应内容。

词源 Etymology

content(内容) + length(长度) 组合而成,用来直观表达“内容的长度”。作为标准化术语,它在早期 HTTP 规范中被定义为报文头字段,用于指明消息体大小,便于传输与解析。

相关词 Related Words

文献与著作中的出现 Literary / Notable Works

  • RFC 7230: Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing
  • RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1(历史版本规范)
  • HTTP: The Definitive Guide(David Gourley 等)
  • RESTful Web Services(Leonard Richardson、Sam Ruby)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   649 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 20:40 · PVG 04:40 · LAX 12:40 · JFK 15:40
♥ Do have faith in what you're doing.