<@U0FLRRSQK> it's been a while now, but I seem to ...
# http4k
d
@Dmitry Kandalov it's been a while now, but I seem to recall that it was added purely as an aid to testing, so the order of added headers was disregarded when performing a comparison. I for one have never actually ever used it in prod code.
u
is the order of the headers relevant in HTTP protocol? if now why not using a Set?
d
The internet says kind of from a 5 second search. RFC says:
Copy code
The order in which header fields with differing field names are received is not significant.
and we have a test to cover that:
Copy code
@Test
    fun `if multiple headers with the same key exist in two headers, they must be in the same order for the headers to be equal`()
u
So... wouldn't be better a map HeaderName -> List<String> ? 🙂