Skip to content

Header order gets rearranged for duplicated header names #2572

Closed
@bagder

Description

@bagder

I have a HTTP client test case that receives the following response:

HTTP/1.1 302 eat this!
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Location: this-is-the-first.html
Content-Length: 0
Connection: close
Location: and there's a second one too! / moo.html

The key take-way is that there are two Location: headers. My client downloads the response and then compares that it stored exactly what was sent. The order of the headers as delivered by hyper is however modified from the original order, which makes comparing really hard - and it makes it harder to understand what's going on over the wire when we can't show the same order.

Hyper delivers the headers in this order:

HTTP/1.1 302 eat this!
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Location: this-is-the-first.html
Location: and there's a second one too! / moo.html
Content-Length: 0
Connection: close

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions