File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1288,16 +1288,16 @@ def run_cgi(self):
12881288 env = env
12891289 )
12901290 if self .command .lower () == "post" and nbytes > 0 :
1291- cursize = 0
1292- data = self .rfile .read (min ( nbytes , _MIN_READ_BUF_SIZE ) )
1293- while (len (data ) < nbytes and len ( data ) != cursize and
1291+ cursize = min ( nbytes , _MIN_READ_BUF_SIZE )
1292+ data = self .rfile .read (cursize )
1293+ while (len (data ) == cursize < nbytes and
12941294 select .select ([self .rfile ._sock ], [], [], 0 )[0 ]):
1295- cursize = len (data )
12961295 # This is a geometric increase in read size (never more
12971296 # than doubling our the current length of data per loop
12981297 # iteration).
12991298 delta = min (cursize , nbytes - cursize )
13001299 data += self .rfile .read (delta )
1300+ cursize += delta
13011301 else :
13021302 data = None
13031303 # throw away additional data [see bug #427345]
You can’t perform that action at this time.
0 commit comments