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 for double-slash uri request #9723
Merged
calvernaz
merged 1 commit into
master
from
8170-bug-apigateway-v2-httpapi-does-not-handle-trailing-slashes-and-raises-authorizer-exception
Nov 29, 2023
Merged
Fix for double-slash uri request #9723
calvernaz
merged 1 commit into
master
from
8170-bug-apigateway-v2-httpapi-does-not-handle-trailing-slashes-and-raises-authorizer-exception
Nov 29, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
1 task
thrau
reviewed
Nov 24, 2023
calvernaz
added
the
semver: patch
Non-breaking changes which can be included in patch releases
label
Nov 24, 2023
calvernaz
force-pushed
the
8170-bug-apigateway-v2-httpapi-does-not-handle-trailing-slashes-and-raises-authorizer-exception
branch
from
November 24, 2023 19:15
8890c50
to
f01cdf9
Compare
bentsku
approved these changes
Nov 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This is great because it does not change current behavior, but allows us to use the new raw_uri
field. This is a really good solution!
Just a small question in comment, but nothing major really. Thanks a lot for fixing this!
calvernaz
force-pushed
the
8170-bug-apigateway-v2-httpapi-does-not-handle-trailing-slashes-and-raises-authorizer-exception
branch
from
November 28, 2023 23:49
47f0e7c
to
7f78fc6
Compare
calvernaz
force-pushed
the
8170-bug-apigateway-v2-httpapi-does-not-handle-trailing-slashes-and-raises-authorizer-exception
branch
from
November 29, 2023 08:25
7f78fc6
to
8b6b226
Compare
calvernaz
deleted the
8170-bug-apigateway-v2-httpapi-does-not-handle-trailing-slashes-and-raises-authorizer-exception
branch
November 29, 2023 09:35
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The RAW_URI can contain a path with a double slash for example, for the request
https://28e9f096.execute-api.localhost.localstack.cloud:4566//hello
, RAW_URI will be//hello
.This will cause an issue parsing the url using the function
urlparse
. With this fix, we replace//
with/
to proceed with the parsing.Changes
Normalizes the RAW_URI by replacing the
//
with/
. It does it in two places, on thehttp
package and on the apigatewayrouter_asf
.Testing
Unit tests for the specific parsing function.