summaryrefslogtreecommitdiffstats
path: root/Lib/http/server.py
diff options
context:
space:
mode:
authorIdan Kapustian <71190257+idankap@users.noreply.github.com>2024-06-16 12:15:03 (GMT)
committerGitHub <noreply@github.com>2024-06-16 12:15:03 (GMT)
commit192d17c3fd9945104bc0303cf248bb0d074d260e (patch)
tree2a9fd31fa0531c5c9b3ac2237c9ec79f98f0bce0 /Lib/http/server.py
parent0c0348adbfca991f78b3aaa6790e5c26606a1c0f (diff)
downloadcpython-192d17c3fd9945104bc0303cf248bb0d074d260e.zip
cpython-192d17c3fd9945104bc0303cf248bb0d074d260e.tar.gz
cpython-192d17c3fd9945104bc0303cf248bb0d074d260e.tar.bz2
gh-120485: Add an override of `allow_reuse_port` on classes subclassing `socketserver.TCPServer` (GH-120488)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r--Lib/http/server.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index 7d0da50..2d01064 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -129,7 +129,8 @@ DEFAULT_ERROR_CONTENT_TYPE = "text/html;charset=utf-8"
class HTTPServer(socketserver.TCPServer):
- allow_reuse_address = 1 # Seems to make sense in testing environment
+ allow_reuse_address = True # Seems to make sense in testing environment
+ allow_reuse_port = True
def server_bind(self):
"""Override server_bind to store the server name."""