Micronaut is decoding the ‘+’ in the path variable passed to the controller code #10564
Labels
info: good first issue
Good for newcomers
type: improvement
A minor improvement to an existing feature
Expected Behavior
In my unit test with I have
URI = "/test/1.0/" +
"024-02-07T00:30:48.014+00:00?time=024-02-07T00:30:48.014+00:00"
The controller has
@Get(uris = {“/test/{version}/{+resourcePath}“})
The resourcePath variable and query param should have the raw format value
resource variable path = 024-02-07T00:30:48.014+00:00
query param = 024-02-07T00:30:48.014+00:00
for downstream processing to work.
Actual Behaviour
@Get(uris = {“/test/{version}/{+resourcePath}“})
In my unit test with
URI = "/test/1.0/" +
"024-02-07T00:30:48.014+00:00?time=024-02-07T00:30:48.014+00:00"
client setting unencoded PATH = /test/1.0/024-02-07T00:30:48.014+00:00
resource variable path = 024-02-07T00:30:48.014 00:00 //'+' is replaced with ' '
from http req : path = /test/1.0/024-02-07T00:30:48.014+00:00
from http req : query param time = 024-02-07T00:30:48.014 00:00 //'+' is replaced with ' '
I would like to get the resourcePath and query param in the raw format for downstream processing.
Steps To Reproduce
Environment Information
JDK 17
Mac OS - 13.6.4
Example Application
No response
Version
3.9.4
The text was updated successfully, but these errors were encountered: