-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow setting URL encoding/decoding to RFC 3986 #11513
base: 4.8.x
Are you sure you want to change the base?
Conversation
http/src/test/groovy/io/micronaut/http/uri/UriBuilderSpec.groovy
Outdated
Show resolved
Hide resolved
still working on this PR, since trying to address decoding |
def result = client.toBlocking().retrieve(req) | ||
|
||
expect:"resolved values should using RFC-3986 decoding" | ||
// TODO: investigate why Netty QueryStringDecoder.parameters() doesn't respect RFC-3986 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to netty/netty@270e9d6 the decoding of +
into space was supposed to be fixed, but it doesn't seem to be fixed for the parameters()
method of QueryStringDecoder. We need to investigate if this is a bug in Netty or by design.
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
Introduce new UrlEncodingKind enum that can be configured from the client configuration for encoding and the router configuration for decoding adapting the URL encoding/decoding to RFC-3986.
Micronaut 5 should likely default to RFC-3986 for everything except form decoding.
Fixes #11434
Fixes #10564
This resolves almost everything, but there appear to be issues with Netty's
parameters()
method ofQueryStringDecoder
. Which seems to be designed for decodingapplication/x-www-form-urlencoded
notRFC-3986
.