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