RFC3261: SIP:20.15 Content-Type

本文解释了HTTP中的Content-Type头字段如何指示消息体的媒体类型,强调了在消息体为空时它的作用,并提供了使用例子,如application/sdp和text/html编码的示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

20.15 Content-Type

   The Content-Type header field indicates the media type of the message-body sent to the recipient.  The "media-type" element is defined in [H3.7].  The Content-Type header field MUST be present if the body is not empty.  If the body is empty, and a Content-Type header field is present, it indicates that the body of the specific type has zero length (for example, an empty audio file).

“Content-Type”报头字段指示发送给收件人的消息体的媒体类型。【H3.7】中定义了“media-type”元素。如果正文不为空,则必须存在“Content-Type”报头字段。如果消息体为空,并且存在“Content-Type”报头字段,则表示特定类型的消息体长度为零(例如,空音频文件)。

   The compact form of the header field is c.

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

   Examples:

示例:

      Content-Type: application/sdp
      c: text/html; charset=ISO-8859-4
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值