-
Notifications
You must be signed in to change notification settings - Fork 356
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
jersey-container-jdk-http ignores host and always binds to wildcard address #3383
Comments
@glassfishrobot Commented |
@glassfishrobot Commented SimpleContainerFactory#_create(URI, SSLContext, SimpleContainer, UnsafeValue<Server, IOException>) in line 277 where InetSocketAddress is created ignoring hostname part of the URL. |
@glassfishrobot Commented |
|
When using the jersey-container-jdk-http to create a HttpServer, the configuration is passed via an URI, from which protocol, port and path is extracted and used.
Yet, it is not possible to bind the server to the localhost/loopback interface. The HttpServer is always bound to the wildcard address via HttpServer.create(new InetSocketAddress(port), 0)
I would prefer to be able to manually bind the HttpServer at a later time, there should be no need to bind the HttpServer at construction. For the constructor, isHttps and path should be sufficient.
If this change is too complicated, it would help to actually use the host part of the URI for the InetSocketAddress
Affected Versions
[2.22.2]
The text was updated successfully, but these errors were encountered: