Skip to content

AWS API Proxy decodes multi-value query parameter into a comma-separated string #2345

@bivapa

Description

@bivapa

Expected Behavior

When I send a multi-value query parameter as part of an x-www-form-urlencoded Lambda Gateway request, I expect it to be decoded in the controller as a collection of values — just like it is in standard server mode (micronaut-http-server-netty), e.g. ["foo", "bar"].

Actual Behaviour

When I send a multi-value query parameter as part of an x-www-form-urlencoded Lambda Gateway request, it is decoded into a comma-separated string, e.g. "foo,bar".

Steps To Reproduce

  • Clone the example application
  • Run ./mvnw -P server clean test
  • The test ExampleServerControllerTest.testMultiValueQueryParameter will pass under the Netty based configuration ✅
  • Run ./mvnw -P serverless clean test
  • The equivalent test ExampleServerlessControllerTest.testMultiValueQueryParameter will fail ❌ under the AWS API Proxy configuration

Environment Information

Java 17

Example Application

https://github.com/bivapa/micronaut-serverless-multi-value-query-bug-report

Version

4.8.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions