Is white space allowed betwee mime header field-name and ':' separator

后端 未结 3 1320
一生所求
一生所求 2021-01-18 08:38

Within a mime header, is white space allowed between the header field-name and \':\' separator? For example, are:

Content-Type: 
3条回答
  •  一个人的身影
    2021-01-18 09:07

    It isn't entirely clear whether it is or is not allowed, by the standard. However, implementations vary in how they handle whitespace between header field names and the colon. I would highly recommend avoiding whitespace there if you can.

    The RFC for reference. This somewhat old article discusses the issue for HTTP headers, a similar standard.

提交回复
热议问题