lidavidm opened a new pull request #8585: URL: https://github.com/apache/arrow/pull/8585
uriparser has a more detailed hostData struct that exposes whether the host is IPv4, IPv6, or something else, but doesn't provide apparent ways to convert back. There's also already tests for the current behavior (IPv6 host gets returned without brackets). If we don't care about those tests, we can simply check if uriparser thinks the host is IPv6, and if so, add the brackets back, without writing an IPv6/IPv4 address formatter. (Though that's technically wrong, I suppose - the host is really the unbracketed address, and the brackets only come into play when formatted as a URI.) Otherwise, here I check if the host looks like IPv6 inside Flight and add the brackets back. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
