-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
WebClient reports 'Host is not specified' for URI with hostname and port, but without scheme #31033
Comments
I agree with @breun . Protocol not specified |
It looks like Can you please provide the "Original Stack Trace"? |
Here's a full stack trace from running this code in a JUnit test:
|
When I run this code in a project with But in a Spring Boot 3.1.2 application (with |
Here is a Spring Boot project that reproduces the Here is a project that only depends on Spring WebFlux and doesn't reproduce the issue, but results in a more sensible |
Thanks for the feedback and sample projects, @breun. Someone from the team will look into it. |
This is similar to #30053 except the URL has a port. We can enhance the fix further to pass a String URI to Reactor Netty as a fallback, in case passing it as a URI fails. |
Affects: 6.0.11
This code works with Spring Framework 5:
But with Spring Framework 6.0.11 it throws:
Adding a scheme to the URI (
http://localhost:1337
) gets rid of this error. Regardless of whether providing a scheme is mandatory, I'd say 'Host is not specified' is not the correct message for this exception.I think there might be some relation to #30053.
The text was updated successfully, but these errors were encountered: