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

UnixSocketEndPoint should return local and remote SocketAddress #2134

Closed
joakime opened this issue Jan 17, 2018 · 5 comments
Closed

UnixSocketEndPoint should return local and remote SocketAddress #2134

joakime opened this issue Jan 17, 2018 · 5 comments

Comments

@joakime
Copy link
Contributor

joakime commented Jan 17, 2018

Currently, our UnixSocketEndPoint has null's for the local/remote endpoints.

https://github.com/eclipse/jetty.project/blob/jetty-9.4.8.v20171121/jetty-unixsocket/src/main/java/org/eclipse/jetty/unixsocket/UnixSocketEndPoint.java#L46-L56

If we can change those methods to return a java.net.SocketAddress then the
existing jnr.unixsocket.UnixSocketChannel can be used to obtain the local/remote UnixSocketAddress (which implements java.net.SocketAddress)

Hopefully these local/remote addresses can then be exposed in the HttpServletRequest local/remote address APIs.

@stale
Copy link

stale bot commented Nov 20, 2019

This issue has been automatically marked as stale because it has been a full year without activit. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale For auto-closed stale issues and pull requests label Nov 20, 2019
@joakime joakime removed the Stale For auto-closed stale issues and pull requests label Nov 20, 2019
@joakime joakime added this to To Do in Jetty 10.0.0 via automation Nov 20, 2019
@sbordet
Copy link
Contributor

sbordet commented Nov 21, 2019

This is trivial to implement, as we have just have to delegate to the UnixSocketChannel passed to the constructor.

@joakime
Copy link
Contributor Author

joakime commented Nov 21, 2019

Seems like it, but it has a hitch ...

    @Override
    public InetSocketAddress getLocalAddress()
    {
        return _channel.getLocalAddress(); // fails, as this is just a SocketAddress, not a InetSocketAddress
    }

@joakime
Copy link
Contributor Author

joakime commented Nov 21, 2019

That's because a UnixSocket's SocketAddress is a file, and has nothing to do with Inet anything.

@sbordet
Copy link
Contributor

sbordet commented Jun 15, 2021

Duplicated by #6410.

@sbordet sbordet closed this as completed Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants