Python 3: Does http.server support ipv6?

Brōtsyorfuzthrāx picture Brōtsyorfuzthrāx · Sep 13, 2014 · Viewed 10.2k times · Source

Does http.server (http being a Python 3.x module) support ipv6? For instance, using this command-line code (which starts a webserver):

python -m http.server [port]

Answer

sebas picture sebas · Apr 3, 2019

Starting with Python 3.8, python -m http.server supports IPv6 (see documentation and bug report with implementation history).

To listen on all all available interfaces:

python -m http.server --bind ::

Python 3.8 is was released on 2019-10-14.