RFC3261: SIP:18.3 框架

18.3 Framing
18.3 框架

   In the case of message-oriented transports (such as UDP), if the message has a Content-Length header field, the message body is assumed to contain that many bytes.  If there are additional bytes in the transport packet beyond the end of the body, they MUST be discarded.  If the transport packet ends before the end of the message body, this is considered an error.  If the message is a response, it MUST be discarded.  If the message is a request, the element SHOULD generate a 400 (Bad Request) response.  If the message has no Content-Length header field, the message body is assumed to end at the end of the transport packet.

在面向消息的传输(如UDP)的情况下,如果消息具有Content-Length报头字段,则假定消息体包含那么多字节。如果传输数据包中有超出消息体末尾的额外字节,则必须丢弃这些字节。如果传输数据包在消息体结束之前结束,则认为这是一个错误。如果该消息是响应,则必须将其丢弃。如果消息是一个请求,则元素应该生成一个400(坏请求)响应。如果消息没有Content-Length报头字段,则假定消息体结束于传输数据包的末尾。

   In the case of stream-oriented transports such as TCP, the Content-Length header field indicates the size of the body.  The Content-Length header field MUST be used with stream oriented transports.

在面向流的传输(如TCP)的情况下,Content-Length报头字段指示消息体的大小。Content-Length报头字段必须与面向流的传输一起使用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值