diff options
author | Lisa Roach <lisaroach14@gmail.com> | 2018-11-26 18:43:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-26 18:43:38 (GMT) |
commit | 433433fa6d55091600ce88dd19206b3902e0a87d (patch) | |
tree | 568dab8c1adcc3e954f012b9b4ae13ac2f5578f6 /Doc/library/http.server.rst | |
parent | 75e4699b31d1d88abad097ad13466c5c07711324 (diff) | |
download | cpython-433433fa6d55091600ce88dd19206b3902e0a87d.zip cpython-433433fa6d55091600ce88dd19206b3902e0a87d.tar.gz cpython-433433fa6d55091600ce88dd19206b3902e0a87d.tar.bz2 |
Adds IPv6 support when invoking http.server directly. (GH-10595)
Diffstat (limited to 'Doc/library/http.server.rst')
-rw-r--r-- | Doc/library/http.server.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst index 29f6e7d..a367e37 100644 --- a/Doc/library/http.server.rst +++ b/Doc/library/http.server.rst @@ -410,14 +410,18 @@ the previous example, this serves files relative to the current directory:: python -m http.server 8000 By default, server binds itself to all interfaces. The option ``-b/--bind`` -specifies a specific address to which it should bind. For example, the -following command causes the server to bind to localhost only:: +specifies a specific address to which it should bind. Both IPv4 and IPv6 +addresses are supported. For example, the following command causes the server +to bind to localhost only:: python -m http.server 8000 --bind 127.0.0.1 .. versionadded:: 3.4 ``--bind`` argument was introduced. +.. versionadded:: 3.8 + ``--bind`` argument enhanced to support IPv6 + By default, server uses the current directory. The option ``-d/--directory`` specifies a directory to which it should serve the files. For example, the following command uses a specific directory:: |