RFC3261: SIP:20.14 Content-Length

20.14 Content-Length

   The Content-Length header field indicates the size of the message-body, in decimal number of octets, sent to the recipient.Applications SHOULD use this field to indicate the size of the message-body to be transferred, regardless of the media type of the entity.  If a stream-based protocol (such as TCP) is used as transport, the header field MUST be used.

Content-Length报头字段指示发送给收件人的消息体的大小,以十进制八位字节为单位。无论实体的媒体类型如何,应用程序都应该使用此字段来指示要传输的消息体的大小。如果使用基于流的协议(如TCP)作为传输,则必须使用报头字段。

   The size of the message-body does not include the CRLF separating header fields and body.  Any Content-Length greater than or equal to zero is a valid value.  If no body is present in a message, then the Content-Length header field value MUST be set to zero.

消息体的大小不包括分隔报头字段和正文的CRLF。任何大于或等于零的“Content-Length”都是有效值。如果消息中不存在消息体,则Content-Length报头字段值必须设置为零。

      The ability to omit Content-Length simplifies the creation of cgi-like scripts that dynamically generate responses.

省略Content-Length的功能简化了动态生成响应的类cgi脚本的创建。

   The compact form of the header field is l.

报头字段的紧凑形式是l。

   Examples:

示例:

      Content-Length: 349
      l: 173
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值