com-lihaoyi / requests-scala

A Scala port of the popular Python Requests HTTP client: flexible, intuitive, and straightforward to use.
Other
730 stars 86 forks source link

Restore 0.8.0 behavior of header values overriding earlier ones for the same key #163

Closed nafg closed 4 months ago

nafg commented 4 months ago

Fixes #161

nafg commented 4 months ago

I didn't add a test.

I try to preserve the header order and case while overwriting by case-insensitive key. To do this I involve a ListMap with lower-cased keys for the map entry key, while including the original key string in the map entry value.

lihaoyi commented 4 months ago

Thanks @nafg ! No worries about the test, I'll add one