Open
Description
Expected Behavior
To support '+' in the path portion of the url, I'm using https://www.rfc-editor.org/rfc/rfc6570#section-3.2.3 to allow reserved characters like so:
@Get("{+variable}")
public HttpResponse<Object> method(@PathVariable("variable") String variable) {
...
}
From this test I understand that f I call my GET endpoint with /tes+t
, I should expect the value of variable
to be tes+t
.
Actual Behaviour
Instead I get tes t
. The plus sign is decoded as a space, which seems to be due to the use of java.net.URLDecoder
in DefaultUriRouteMatch.
If you think this behavior should remain, then it'd be very helpful to have a configuration to opt-out of it.
Steps To Reproduce
- Any project with an http server.
- Add an endpoint that has a path variable allowing reserved characters:
@Get("{+variable}")
- Send a request to said endpoint with a value containing the plus sign.
- Inspect the value of the variable inside to annotated method, it should have a space instead of the plus sign.
Environment Information
OS: MacOS Catalina
JDK 11
Example Application
No response
Version
3.6.0