You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Micronaut's HttpClient to make a request to an endpoint using query params that contain spaces, the spaces are correctly encoded as %20 per RFC3986 (URI Generic Syntax).
Expected Behavior
When using Micronaut's HttpClient to make a request to an endpoint using query params that contain spaces, the spaces are correctly encoded as
%20
per RFC3986 (URI Generic Syntax).Actual Behaviour
The spaces are encoded as
+
. That's because DefaultUriBuilder uses java.net.URLEncoder for query parameter encoding, which in turn is based off of the W3C's HTML 4 specification and subsequently encodes spaces as+
See this StackOverflow answer for a better understanding of some of the confusion. For reference, Spring's UriUtils is correctly based on RFC3986
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
4.7.1
The text was updated successfully, but these errors were encountered: