Commits

Dmitry Fedorov committed ef6400f

fix for large uploads on windows

  • Participants
  • Parent commits b213fd9

Comments (0)

Files changed (1)

File paste/httpserver.py

         max_read = self.length - self._consumed
         if len(args):
             max_read = min(args[0], max_read)
-        total = max_read
         # readline errors in windows for files larger than 2GB, limit max_read size by maxint
         max_read = min(max_read, sys.maxint)
-#        data = []
-#        while total>0:
-#            buf = self.file.readline(max_read)
-#            data.append(buf)
-#            total -= max_read
-#            if len(buf)<max_read:
-#                break
-#        data = ''.join(data)      
         data = self.file.readline(max_read)      
         self._consumed += len(data)
         return data