@@ -459,27 +459,6 @@ such as using different index file names by overriding the class attribute
459459:attr: `index_pages `.
460460
461461
462- The server can also support TLS encryption. The options ``--tls-cert `` and
463- ``--tls-key `` allow specifying a TLS certificate chain and a private key for
464- HTTPS connections. For example, the following command runs the server with
465- TLS enabled:
466- 
467- .. code-block :: bash 
468- 
469-    python -m http.server --tls-cert fullchain.pem 
470- 
471-  Use the ``--tls-password-file `` option if private keys are password-protected:
472- 
473- .. code-block :: bash 
474- 
475-    python -m http.server \ 
476-           --tls-cert cert.pem \ 
477-           --tls-key key.pem \ 
478-           --tls-password-file password.txt 
479- 
480-  .. versionchanged :: next 
481-    Added the ``--tls-cert ``, ``--tls-key `` and ``--tls-password-file `` options.
482- 
483462.. class :: CGIHTTPRequestHandler(request, client_address, server) 
484463
485464   This class is used to serve either files or output of CGI scripts from the
@@ -603,6 +582,34 @@ The following options are accepted:
603582   are not intended for use by untrusted clients and may be vulnerable
604583   to exploitation. Always use within a secure environment.
605584
585+ .. option :: --tls-cert 
586+ 
587+    The server can also support TLS encryption. The option ``--tls-cert `` allow
588+    specifying a TLS certificate chain for HTTPS connections. For example,
589+    the following command runs the server with TLS enabled::
590+ 
591+       python -m http.server --tls-cert fullchain.pem 
592+ 
593+    .. versionadded :: next 
594+ 
595+ .. option :: --tls-key 
596+ 
597+    Specifies private key for HTTPS connections.
598+ 
599+    .. versionadded :: next 
600+ 
601+ .. option :: --tls-password-file 
602+ 
603+    Use the ``--tls-password-file `` option if private keys are
604+    password-protected::
605+ 
606+       python -m http.server \ 
607+              --tls-cert cert.pem \ 
608+              --tls-key key.pem \ 
609+              --tls-password-file password.txt 
610+ 
611+    .. versionadded :: next 
612+ 
606613
607614.. _http.server-security :
608615
0 commit comments