-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
RestClient does not suppport _ in url #30463
Comments
Very interesting... We'll take a look soon |
/cc @Sgitario (rest-client), @cescoffier (rest-client) |
Hmmm, is |
I'm looking into that now |
It appears that host names are limited to letters-digits-hyphen according to RFC 1123, section 2.1 "Host Names and Numbers". |
I'm not saying we should fix this but the error we throw is a bit weird to me. @Kizoku-Dev if you provide a small reproducer, I will have a look at trying to improve the user feedback. |
As experienced in quarkusio#30463, it seems it can happen.
My guess is that you should have a better error message with the following PR: #30490 . I'm closing this. If you can come up with a small reproducer, please attach it so I can make sure the error message is now actionable. |
As experienced in quarkusio#30463, it seems it can happen.
As experienced in quarkusio#30463, it seems it can happen.
As experienced in quarkusio#30463, it seems it can happen. (cherry picked from commit cec7cd3)
Describe the bug
I configured the base url through the application.yml. My url is working as I can request it through postman for exemple.
The URL is : http://test.some_url.domain.com
As you can see there is an _ in the URL. If I run the app with this when I try to make a call through the rest client, it try to connect to locahost instead of my URL.
But when I try an URL without _ or when I call my rest service through the IP instead of the URL it works.
Expected behavior
Rest client connect to my URL in order to process my call.
Actual behavior
Rest client try to connect to localhost.
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.15.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
When I use the URL with an _ I can see that my rest client is build with the URL in its authority field.
When I use the URL without an _ or with an IP I can see that my rest client is build with the URL in its host field.
The text was updated successfully, but these errors were encountered: