|
From: Twylite <tw...@cr...> - 2010-02-03 17:58:50
|
Hi, Missed the original comment so I'm not sure if I'm quoting the right person here (apologies otherwise): > "Tom Jackson" <tom...@gm...> wrote: > >> HTTP headers do not fit into a dictionary type structure, HTTP headers >> have an order, which is not maintained with a dict. >> Pedantic: Not true (with one exception). The order of HTTP headers is only significant for those headers that have the same name. If HTTP field order was in general significant and preserved then OAuth and AWS wouldn't have to go to lengths to define an ordering for elements in their signature formats. Ref. http://www.faqs.org/rfcs/rfc2616.html section 4.2: "The order in which header fields with differing field names are received is not significant. However, it is "good practice" to send general-header fields first, followed by request-header or response- header fields, and ending with the entity-header fields. "Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded." Regards, Twylite |