cpython: e0fbd25f0b36 (original) (raw)

Mercurial > cpython

changeset 100259:e0fbd25f0b36 2.7

Issue #26309: Shut down SocketServer request if verify_request() is false Based on patch by Aviv Palivoda. [#26309]

Martin Panter vadmium+py@gmail.com
date Thu, 18 Feb 2016 10:43:55 +0000
parents c272a1e53f5b
children cba717fa8e10
files Lib/SocketServer.py Lib/test/test_socketserver.py Misc/NEWS
diffstat 3 files changed, 29 insertions(+), 0 deletions(-)[+] [-] Lib/SocketServer.py 2 Lib/test/test_socketserver.py 23 Misc/NEWS 4

line wrap: on

line diff

--- a/Lib/SocketServer.py +++ b/Lib/SocketServer.py @@ -296,6 +296,8 @@ class BaseServer: except: self.handle_error(request, client_address) self.shutdown_request(request)

def handle_timeout(self): """Called if no new request arrives within self.timeout.

--- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -326,6 +326,29 @@ class SocketServerTest(unittest.TestCase SocketServer.TCPServer((HOST, -1), SocketServer.StreamRequestHandler)

+

+

+

+

+ def test_main(): if imp.lock_held():

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -50,6 +50,10 @@ Core and Builtins Library ------- +- Issue #26309: In the "socketserver" module, shut down the request (closing