-
Notifications
You must be signed in to change notification settings - Fork 84
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
--listen and --host options do not support IPv6 addresses #149
Comments
the patch looks reasonable and the additional dep for IO::Socket::IP sounds fine to me. Not sure what else you need to support ipv6 though. |
About testing starman with IPv6: assuming your
then you can already test IPv6 using a hostname, not an address. This looks good:
netstat sees only a IPv6 bind, no tcp (without "6") entry:
Accessing using the IPv4 localhost address does not work, as expected:
IPv6 works, both with address and hostname:
strace also shows that IPv6 is in use:
|
Patching Starman::Server is not enough, also https://github.com/plack/Plack/blob/ae1fb1d2fc603f11bdd2fb162438a103007d12ac/lib/Plack/Runner.pm#L93-L115 needs proper IPv6 handling. |
Yeah, what about requiring square bracket for ipv6 addresses like you do in URI? |
If using an IPv6 address in
--listen
or--host
(any, because every IPv6 address contains at least one colon), then starman fails like this:(depending on the used address different error messages like
may happen)
Problem is the usage of split in
Starman/lib/Starman/Server.pm
Line 77 in 1fb6f66
A proper solution would implement something similar like IO::Socket::IP->split_addr.
However, a solution would also need to support the "...:$option" (i.e. "...:ssl") notation.
An informal patch exists in eserte@6ffcd59
However I do not propose to apply this patch, as it would require an additional dependency.
The text was updated successfully, but these errors were encountered: