【问题标题】:Content-type Multiple Parameters内容类型多参数
【发布时间】:2020-09-15 20:27:20
【问题描述】:

根据 RFC 链接,Hypertext Transfer Protocol -- HTTP/1.1content-type 定义为

 Content-Type   = "Content-Type" ":" media-type

媒体类型定义为

media-type     = type "/" subtype *( ";" parameter )
type           = token
subtype        = token

所以,按照这个

ContentType: application/soap+xml; charset=utf-8

是有效的。 ContentType 可以有多个参数吗?例如:

ContentType: application/soap+xml; charset=utf-8; action="urn:CreateCredential"

问候

【问题讨论】:

    标签: http response-headers


    【解决方案1】:

    当前规范是 RFC 7231,而不是 RFC 2616。

    但是是的:

    *( ";" parameter )
    

    表示可以有多个参数。

    【讨论】:

      猜你喜欢
      • 2019-01-03
      • 1970-01-01
      • 2018-09-07
      • 2017-02-24
      • 2014-06-08
      • 2012-08-13
      • 1970-01-01
      • 2021-07-22
      • 1970-01-01
      相关资源
      最近更新 更多