Hi,

Right now it's not possible to use runserver on an IPv6 address literally with the http://[::1]:8080 style format.

I've resolved this by switching to using filter_var() instead of ip2long() to validate IPs and always append the http schema before passing to parse_url(), as parse_url() itself is not awesome at figuring out IPv6 literals the way it was before.

Have tested on both builtin and cgi engines with D8 HEAD, and checked that the IPv4 examples still parse and start up correctly.

Enjoy!

CommentFileSizeAuthor
drush-runserver-ipv6.patch2.11 KBneilnz

Comments

moshe weitzman’s picture

Assigned: Unassigned » owen barton

Thanks! Assigning to Owen, the runserver maintainer.

owen barton’s picture

Status: Needs review » Fixed

Committed - I changed the logic slightly, since this was breaking the useful shorthand of just passing in a path (i.e. "drush rs admin"). Now it does a bit more work to detect an IP address (v4 or v6) and only prefixes http:// in that case.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.