Skip to content
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

Fix spaces encoding inside DefaultUriBuilder #11439

Open
wants to merge 2 commits into
base: 4.8.x
Choose a base branch
from

Conversation

glorrian
Copy link
Contributor

@glorrian glorrian commented Dec 13, 2024

fix: #11434
I have implemented a hardcoded solution to address the current issue because I am concerned about completely rewriting the functionality of java.net.URLEncoder, but i think it should be own MK uri encoder like it implemented in Spring

@sdelamo sdelamo requested a review from yawkat December 13, 2024 13:51
@jamesdh
Copy link

jamesdh commented Dec 13, 2024

You might be better off just using Apache's URIBuilder rather than hardcoding a mini-workaround or completely reinventing the wheel. URIBuilder gives you the option to specify how to handle spaces, which could be made configurable in case someone prefers Micronauts existing behavior.

@glorrian
Copy link
Contributor Author

glorrian commented Dec 13, 2024

firstly, MK doesn't have a dependency on apache httpcore yet, and I'm not sure about its license to add this. also, I am not sure about the behavior of apache decoder in other tests and cases.

@glorrian
Copy link
Contributor Author

I would wait for the review, if the decision on the new encoder is approved, then I will be glad to implement your proposal

@jamesdh
Copy link

jamesdh commented Dec 13, 2024

Yea, I realized after commenting that micronaut-core doesn't directly have a dependency on anything apache, so that's probably not viable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

HttpClient incorrectly encodes query params containing spaces with + and not %20
2 participants