Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The request signature we calculated does not match the signature you provided #57

Closed
Rayv1 opened this issue May 12, 2020 · 2 comments
Closed

Comments

@Rayv1
Copy link

Rayv1 commented May 12, 2020

Hi,

i have a Problem with the Encoding and i have no clue where its coming from.

Package: 2 0.1.12+3

What iam Doing:
Get request against API Gateway.

code:

    final signedRequest = new SigV4Request(
      awsSigV4Client,
      method: 'GET',
      path: "/path/$querystring",
      headers: new Map<String, String>.from({}),
      queryParams: new Map<String, String>.from({}),
    );
    Response response;
    response = await http.get(
      signedRequest.url,
      options: Options(
        headers: signedRequest.headers,
      ),
    );

When i pass no special Characters it works, but as soon i pass characters like &ÄÜÖ i receive an error:
"The request signature we calculated does not match the signature you provided
The Canonical String for this request should have been
'GET
/path/%25C3%25A4 (<<< is an double encoded 'ä')
"
it seems like it is double encoded and i have no clue where to start whats going on here.

Any thoughts?

Best Regards,

@furaiev
Copy link
Owner

furaiev commented May 12, 2020

Hey,
I would recommend you to change umlauts with their analogs like ae, oe, ue.
If it isn't possible, pls check this topic dart-lang/http#227

First of all, check what the package pass to http to find if this package or http package is the reason.

@furaiev
Copy link
Owner

furaiev commented May 27, 2020

I close this issue. Please let me know if it should be reopened.

@furaiev furaiev closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants