@@ -459,55 +459,6 @@ such as using different index file names by overriding the class attribute
459459:attr: `index_pages `.
460460
461461
462- .. class :: CGIHTTPRequestHandler(request, client_address, server) 
463- 
464-    This class is used to serve either files or output of CGI scripts from the
465-    current directory and below. Note that mapping HTTP hierarchic structure to
466-    local directory structure is exactly as in :class: `SimpleHTTPRequestHandler `.
467- 
468-    .. note ::
469- 
470-       CGI scripts run by the :class: `CGIHTTPRequestHandler ` class cannot execute
471-       redirects (HTTP code 302), because code 200 (script output follows) is
472-       sent prior to execution of the CGI script.  This pre-empts the status
473-       code.
474- 
475-    The class will however, run the CGI script, instead of serving it as a file,
476-    if it guesses it to be a CGI script.  Only directory-based CGI are used ---
477-    the other common server configuration is to treat special extensions as
478-    denoting CGI scripts.
479- 
480-    The :func: `do_GET ` and :func: `do_HEAD ` functions are modified to run CGI scripts
481-    and serve the output, instead of serving files, if the request leads to
482-    somewhere below the ``cgi_directories `` path.
483- 
484-    The :class: `CGIHTTPRequestHandler ` defines the following data member:
485- 
486-    .. attribute :: cgi_directories 
487- 
488-       This defaults to ``['/cgi-bin', '/htbin'] `` and describes directories to
489-       treat as containing CGI scripts.
490- 
491-    The :class: `CGIHTTPRequestHandler ` defines the following method:
492- 
493-    .. method :: do_POST() 
494- 
495-       This method serves the ``'POST' `` request type, only allowed for CGI
496-       scripts.  Error 501, "Can only POST to CGI scripts", is output when trying
497-       to POST to a non-CGI url.
498- 
499-    Note that CGI scripts will be run with UID of user nobody, for security
500-    reasons.  Problems with the CGI script will be translated to error 403.
501- 
502-    .. deprecated-removed :: 3.13 3.15 
503- 
504-       :class: `CGIHTTPRequestHandler ` is being removed in 3.15.  CGI has not
505-       been considered a good way to do things for well over a decade. This code
506-       has been unmaintained for a while now and sees very little practical use.
507-       Retaining it could lead to further :ref: `security considerations 
508-       <http.server-security>`.
509- 
510- 
511462.. _http-server-cli :
512463
513464Command-line interface
@@ -564,24 +515,6 @@ The following options are accepted:
564515
565516   .. versionadded :: 3.11 
566517
567- .. option :: --cgi 
568- 
569-    :class: `CGIHTTPRequestHandler ` can be enabled in the command line by passing
570-    the ``--cgi `` option::
571- 
572-       python -m http.server --cgi 
573- 
574-    .. deprecated-removed :: 3.13 3.15 
575- 
576-       :mod: `http.server ` command line ``--cgi `` support is being removed
577-       because :class: `CGIHTTPRequestHandler ` is being removed.
578- 
579- .. warning ::
580- 
581-    :class: `CGIHTTPRequestHandler ` and the ``--cgi `` command-line option
582-    are not intended for use by untrusted clients and may be vulnerable
583-    to exploitation. Always use within a secure environment.
584- 
585518.. option :: --tls-cert 
586519
587520   Specifies a TLS certificate chain for HTTPS connections::
0 commit comments