[issue1767511] SocketServer.DatagramRequestHandler

2008-01-23 Thread Ben Bass

Ben Bass added the comment:

I've just bumped into this issue.  In my opinion the finish() method 
should only do anything if wfile is not empty, i.e:

temp = self.wfile.getvalue()
if temp:
self.socket.sendto(temp, self.client_address)

--
nosy: +bpb

_
Tracker <[EMAIL PROTECTED]>

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



[issue1767511] SocketServer.DatagramRequestHandler

2008-01-23 Thread Christian Heimes

Christian Heimes added the comment:

Can you provide a working patch with a unit test and doc updates?

--
nosy: +tiran
type:  -> behavior
versions: +Python 2.6

_
Tracker <[EMAIL PROTECTED]>

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



[issue1767511] SocketServer.DatagramRequestHandler

2008-01-23 Thread Ben Bass

Ben Bass added the comment:

Main issue here (as I see it) is that StreamRequestHandler and 
DatagramRequestHandler should behave in the same way. This is not the 
case in Python 2.5.1 for the case where the handle method does not 
respond to the request socket (e.g. in my case it is forwarding data to 
a different socket).

 While handler methods in StreamRequestHandler need not send any data 
back to the request socket, in DatagramRequestHandlers an attempt will 
be made to send data whether any is available or not. This causes a 
socket hang (for several minutes) on Windows with a '10040 Message too 
long' error.

 By only sending data back to the request if the handler has written to 
wfile, this is avoided, giving the twin fixes of avoiding a nasty 
socket error and providing compatibilty with StreamRequestHandler 
behaviour.

Test has been updated to add tests of handlers which do not respond to 
the request; this causes a hang in Python2.5.1 stock (not sure how to 
avoid this and cleanly fail), test passes with changed SocketServer.

p.s. this is my first patch submission to anything, so go easy :-)

Added file: http://bugs.python.org/file9271/DatagramServer.diff

_
Tracker <[EMAIL PROTECTED]>

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



[issue1767511] SocketServer.DatagramRequestHandler

2010-06-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 2.5

___
Python tracker 

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



[issue1767511] SocketServer.DatagramRequestHandler

2012-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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