saibotsivad / aws-sig-v4-test-suite

Check your AWS V4 signing code against the official test suite.
1 stars 0 forks source link

Duplicate header keys are not parsed correctly #1

Closed saibotsivad closed 4 years ago

saibotsivad commented 4 years ago

For example, in the raw get-header-duplicate-key.req it has:

Host:example.amazonaws.com
My-Header1:value2
My-Header1:value2
My-Header1:value1
X-Amz-Date:20150830T123600Z

But the value in the generated tests.json file is:

        "headers": {
          "Host": "example.amazonaws.com",
          "My-Header1": "value1",
          "X-Amz-Date": "20150830T123600Z"
        },
saibotsivad commented 4 years ago

I imagine that the thing to do is probably make headers an array of arrays?

        "headers": [
          [ "Host", "example.amazonaws.com" ],
          [ "My-Header1", "value1" ],
          [ "My-Header1", "value1" ],
          [ "My-Header1", "value1" ],
          [ "X-Amz-Date", "20150830T123600Z" ]
        ],
saibotsivad commented 4 years ago

Fixed with 2.0.0 release https://github.com/saibotsivad/aws-sig-v4-test-suite/blob/master/CHANGELOG.md#200---2020-01-10