Skip to content

libAmy's parse_http_headers breaks RFC 2616 section 4.2 #2

Description

@awilfox
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.

This means that, given the input:

Accept-Language: cy_GB
Accept-Language: en_GB

It is expected that this is internally coalesced as:

Accept-Language: cy_GB, en_GB

However, currently, each new value replaces the old value:

Accept-Language: en_GB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions