在mime标头字段名和':'分隔符之间是否允许使用空格 [英] Is white space allowed betwee mime header field-name and ':' separator
问题描述
在mime标头中,标头字段名和':'分隔符之间是否允许空格?例如,是:
Within a mime header, is white space allowed between the header field-name and ':' separator? For example, are:
Content-Type: <value>
和
Content-Type : <value>
等效吗?
此外,您能否提供描述该标准的mime标准的指针?我检查了一些但没有找到.
Also, can you please provide a pointer to the mime standard where this is described? I checked a few but did not find it.
谢谢
推荐答案
目前尚不清楚标准是否允许这样做.但是,实现方式在处理标头字段名称和冒号之间的空白方面有所不同.如果可能的话,我强烈建议您避免在其中留白.
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.
RFC供参考. 这篇有点老的文章讨论了HTTP标头的问题,这是一个类似的标准.
The RFC for reference. This somewhat old article discusses the issue for HTTP headers, a similar standard.
这篇关于在mime标头字段名和':'分隔符之间是否允许使用空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!