Ticket #13756: tomcat_fileupload.diff

File tomcat_fileupload.diff, 562 bytes (added by Sven Klemm, 14 years ago)

Patch for multipart parser to make file upload work under tomcat

  • django/http/multipartparser.py

     
    401401            num_bytes = self.remaining
    402402        else:
    403403            num_bytes = min(num_bytes, self.remaining)
    404         self.remaining -= num_bytes
    405         return self._file.read(num_bytes)
     404        buf = self._file.read(num_bytes)
     405        self.remaining -= len(buf)
     406        return buf
    406407
    407408class InterBoundaryIter(object):
    408409    """
Back to Top