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

#720: Do not double-escape URL query strings in HTTP API v2 functions #721

Merged
merged 3 commits into from
Apr 5, 2021

Conversation

petli
Copy link
Contributor

@petli petli commented Aug 17, 2020

Issue #, if available: #720

Description of changes: Remove code to escape query string, since it is already escaped in HTTP API v2. My guess is that this was implemented because v1 events needed to build a query string from unescaped values.

This may change the behaviour of issues like #237 (though that one must've been filed for API v1). However, + being replaced by space is done by ASP.NET Core MVC and not something that should be attempted to be suppressed by the lambda framework.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ashovlin
Copy link
Member

Thank you for the PR! We've tested and are planning to accept it, and may combine with another fix we have in progress internally since they're introducing changes to existing behavior.

@petli
Copy link
Contributor Author

petli commented Jan 12, 2021

@ashovlin Do you have any update on the progress for accepting this PR, or has that other fix mentioned caused this PR to no longer be relevant?

@normj
Copy link
Member

normj commented Mar 31, 2021

Approved the PR. It makes sense to get the behavior to running ASP.NET Core through Kestrel. Because this is a breaking change we will need to do a major version bump to 6.0.0.

Copy link
Member

@ashovlin ashovlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but might be nice to update the comment above CreateQueryStringParametersFromHttpApiV2 to clarify that the raw query string now matches the intended encoding and we're not encoding again.

(I know this sat a long time, so if not quick to revisit I imagine we can also clean it up when adding the commit for the version bump)

@petli
Copy link
Contributor Author

petli commented Apr 1, 2021

Thanks! I've updated the code comment, and also merged with master to aid merging this PR.

@ashovlin
Copy link
Member

ashovlin commented Apr 1, 2021

Thanks! Updated docs look good.

@normj normj changed the base branch from master to dev April 5, 2021 16:25
@normj normj merged commit b19a202 into aws:dev Apr 5, 2021
@normj
Copy link
Member

normj commented Apr 5, 2021

PR released as part of version 6.0.0

@petli petli deleted the 720-double-escape-query-httpapi-v2 branch April 6, 2021 09:18
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

Successfully merging this pull request may close these issues.

3 participants