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

Lambda proxy is encoding plus character as a space for query parameters #1529

Open
AndrejMitrovic opened this issue Dec 12, 2022 · 2 comments

Comments

@AndrejMitrovic
Copy link

AndrejMitrovic commented Dec 12, 2022

Expected Behavior

This is a similar bug to #656.

When setting up a lambda proxy, query parameters end up having + converted to a space ( ). This is a problem when hooking up a Lambda to the AWS API Gateway as the gateway auto-decodes query parameters before passing them to the Lambda. So for example, foo%2Bbar will get decoded to foo+bar, passed on to the Lambda, but then Micronaut will then convert this into the value foo bar.

Actual Behaviour

Expected + to not be auto-converted to space ( ) for query parameters.

Steps To Reproduce

Clone https://github.com/AndrejMitrovic/micronaut-plus-bug-demo
And run: gradle test -i
The expected output is: Query parameter is: foo+bar
But the actual output is: Query parameter is: foo bar

Environment Information

OS: Windows 10
JDK: temurin-11

Example Application

https://github.com/AndrejMitrovic/micronaut-plus-bug-demo

Version

Micronaut v2.1.2

@AndrejMitrovic
Copy link
Author

It looks like this bug only affects v2.x of Micronaut. I've tested it with v3.7.4 and the output is as expected.

@AndrejMitrovic
Copy link
Author

Is v2.x still maintained? Or is our only option to upgrade to v3.x?

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

1 participant