digitalbazaar / http-signature-header

BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Adds a test where multiple duplicate headers have become a comma separated list. #32

Closed aljones15 closed 3 years ago

aljones15 commented 3 years ago

When express receives an HTTP message with the same header listed multiple times:

> GET / HTTP/1.1
> Host: localhost:3000
> User-Agent: curl/7.74.0
> Accept: application/json
> Content-Type: application/json
> foo: true
> foo: false

express turn the multiple headers into a comma separated list:

{
  host: 'localhost:3000',
  'user-agent': 'curl/7.74.0',
  accept: 'application/json',
  'content-type': 'application/json',
  foo: 'true, false'
}
[
  'Host',
  'localhost:3000',
  'User-Agent',
  'curl/7.74.0',
  'Accept',
  'application/json',
  'Content-Type',
  'application/json',
  'foo',
  'true',
  'foo',
  'false'
]

This adds a test to ensure that if this library receives one of these lists it handles it correctly.