Commits

Sylvain Hellegouarch committed 4cda5d5

next() in SizeCheckWrapper now raises MaxSizeExceeded instead of StopIteration for consistency when the max length is reached

  • Participants
  • Parent commits 1a6a501

Comments (0)

Files changed (1)

cherrypy/_cpwsgiserver.py

     def next(self):
         data = self.rfile.next()
         self.bytes_read += len(data)
-        try:
-            self._check_length()
-        except:
-            raise StopIteration()
+        self._check_length()
+##      Normally the next method must raise StopIteration when it
+##      fails but CP expects MaxSizeExceeded 
+##        try:
+##            self._check_length()
+##        except:
+##            raise StopIteration()
         return data
 
 class HTTPRequest(object):