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

fix(awsjson): URI Result not matched correctly #3530

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

joostvdwsd
Copy link

Motivation and Context

When trying out the AWS Json protocol I could not get a valid 200 result. After diving into the issue the awsjson router was not matching the url correctly when running from aws lambda.
The incomming request.uri() would result into "/?" instead of "/". This would always result in a mismatch.

Description

At this moment the fix is to use request.uri().path() != "/". This will result in correct behavior.

One downside of fixing it this way is that it will not be strict on requests against the root path with query params. It will allow any query param now.

Testing

Testing was now done on AWS lambda. No additional unit tests are created yet if the team finds this applicable..

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@joostvdwsd joostvdwsd requested a review from a team as a code owner March 28, 2024 14:33
@rcoh rcoh enabled auto-merge March 28, 2024 20:39
@rcoh rcoh disabled auto-merge March 28, 2024 20:39
@rcoh rcoh requested a review from drganjoo April 2, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants