-
Notifications
You must be signed in to change notification settings - Fork 155
Support IPv6 in routing procedure responses #392
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
Conversation
This commit improves parsing in `BoltServerAddress` to support IPv6 in `getServers()` and `getRoutingTable()` procedure responses.
} | ||
|
||
@Test | ||
public void shouldParseIPv6Addresses() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try also with zone-id like [fe80::b279:2f%en0]:1234 ?
@@ -63,7 +63,7 @@ public void shouldReceiveServerInfoAfterInit() throws Throwable | |||
SocketClient socket = mock( SocketClient.class ); | |||
SocketConnection conn = new SocketConnection( socket, SERVER_INFO, DEV_NULL_LOGGER ); | |||
|
|||
when( socket.address() ).thenReturn( BoltServerAddress.from( URI.create( "http://neo4j.com:9000" ) ) ); | |||
when( socket.address() ).thenReturn( new BoltServerAddress( URI.create( "http://neo4j.com:9000" ) ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but why is this http:// ?
In the server code I handle the hostname string representation as only ::1 and not as [::1]. Only when combined in some form are the brackets used, e.g. bolt://[::1]:1234 or in config [fe80::1]:1234 etc. Just for consideration. |
To support IPv6 with and without brackets and zone ids.
@martinfurmanski comments should now be addressed |
@martinfurmanski, @ali-ince thanks for the review! Merging... |
This PR improves parsing in
BoltServerAddress
to support IPv6 ingetServers()
andgetRoutingTable()
procedure responses.