[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-15 Thread Aviv Palivoda

Aviv Palivoda added the comment:

I changed the test to just check that shutdown_request is called. Hope this is 
more clear then the previous test.

--
Added file: 
http://bugs.python.org/file41930/socketserver-shutdown-if-verify-false4.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-13 Thread Martin Panter

Martin Panter added the comment:

Thanks for the test, but it is a bit confusing to have the shutdown_request() 
method call finish_request() and actually do normal request handling. Maybe it 
would be better to not handle the request (and not test that a response is 
received), and just check that shutdown_request() is called or that the client 
socket is explicitly closed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-09 Thread Martin Panter

Martin Panter added the comment:

The patch looks good to me. Are you interested in writing a unit test for it? 
Having said that, it might be a tricky test to write.

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-08 Thread Aviv Palivoda

New submission from Aviv Palivoda:

When socketserver.BaseServer.verify_request() return False then we do not call 
shutdown_request. If we will take the TCPServer as example we will call 
get_request thus calling socket.accept() and creating a new socket but we will 
not call shutdown_request to close the unused socket.

--
components: Library (Lib)
files: socketserver-shutdown-if-verify-false.patch
keywords: patch
messages: 259861
nosy: palaviv
priority: normal
severity: normal
status: open
title: socketserver.BaseServer._handle_request_noblock() don't shutdwon request 
if verify_request is False
type: resource usage
versions: Python 2.7, Python 3.5, Python 3.6
Added file: 
http://bugs.python.org/file41855/socketserver-shutdown-if-verify-false.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26309] socketserver.BaseServer._handle_request_noblock() don't shutdwon request if verify_request is False

2016-02-08 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Had a small mistake in the previous patch (did not notice process_request) call 
shutdown_request.

fixed the patch

--
Added file: 
http://bugs.python.org/file41856/socketserver-shutdown-if-verify-false2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com