本文介绍了HTTP响应中的标头顺序是否重要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
标题的顺序是否
A: 1
B: 2
vs
B:2
A:1
我想知道我是否可以使用字典来存储标题列表,或者它是否需要某种列表或有序字典。
I'm trying to figure out if I can use a dictionary to store a list of headers or if it needs to be some kind of list or ordered dictionary.
推荐答案
不,对于具有不同名称的标题无关紧要。请参阅,第4.2节:
No, it does not matter for headers with different names. See RFC 2616, section 4.2:
但是,对于具有相同名称的多个标题,这很重要:
It DOES matter, however, for multiple headers with the same name:
这篇关于HTTP响应中的标头顺序是否重要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!