gh-133810: remove http.server.CGIHTTPRequestHandler and --cgi flag (#133811)

The CGI HTTP request handler has been deprecated since Python 3.13.
This commit is contained in:
Bénédikt Tran 2025-05-17 09:58:16 +02:00 committed by GitHub
parent 2f1ecb3bc4
commit faac627e47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 28 additions and 755 deletions

View file

@ -181,11 +181,10 @@ def _strip_ipv6_iface(enc_name: bytes) -> bytes:
return enc_name
class HTTPMessage(email.message.Message):
# XXX The only usage of this method is in
# http.server.CGIHTTPRequestHandler. Maybe move the code there so
# that it doesn't need to be part of the public API. The API has
# never been defined so this could cause backwards compatibility
# issues.
# The getallmatchingheaders() method was only used by the CGI handler
# that was removed in Python 3.15. However, since the public API was not
# properly defined, it will be kept for backwards compatibility reasons.
def getallmatchingheaders(self, name):
"""Find all header lines matching a given header name.