[Python-checkins] python/dist/src/Lib asynchat.py,1.15,1.15.22.1
akuchling@users.sourceforge.net
akuchling@users.sourceforge.net
Wed, 12 Mar 2003 06:11:02 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv3417
Modified Files:
Tag: release22-maint
asynchat.py
Log Message:
[Backport patch #649762] Fix for asynchat endless loop
When the null string is used as the terminator, it used to be the same
as None, meaning "collect all the data". In the current code, however, it
falls into an endless loop; this change reverts to the old behavior.
Index: asynchat.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asynchat.py,v
retrieving revision 1.15
retrieving revision 1.15.22.1
diff -C2 -d -r1.15 -r1.15.22.1
*** asynchat.py 8 Apr 2001 07:23:44 -0000 1.15
--- asynchat.py 12 Mar 2003 14:11:00 -0000 1.15.22.1
***************
*** 95,99 ****
lb = len(self.ac_in_buffer)
terminator = self.get_terminator()
! if terminator is None:
# no terminator, collect it all
self.collect_incoming_data (self.ac_in_buffer)
--- 95,99 ----
lb = len(self.ac_in_buffer)
terminator = self.get_terminator()
! if terminator is None or terminator == '':
# no terminator, collect it all
self.collect_incoming_data (self.ac_in_buffer)