tsibelman / aws-signer-v4-dot-net

Sign HttpRequestMessage using AWS Signature v4 using request information and credentials.
Apache License 2.0
72 stars 27 forks source link

Sort header keys with OrdinalIgnoreCase #11

Closed carathorys closed 5 years ago

carathorys commented 5 years ago

I've found a bug: The headers should be sorted alphabetically, but if you doesn't define the OrdinalIgnoreCase, this will fail: If you have an x-api-key and a x-apigw-api-id the correct order should be:

  1. x-api-key
  2. x-apigw-api-id

Without the OrdinalIgnoreCase option it would be:

  1. x-apigw-api-id
  2. x-api-key

It's not a must have, but I've run into this, and it took some hours to find where is it failing

tsibelman commented 5 years ago

Thank you, I will merge and deploy the fix tomorrow