Ticket #10687: multipartparser.py.diff

File multipartparser.py.diff, 747 bytes (added by rfk, 6 years ago)
  • django/http/multipartparser.py

     
    8484
    8585        # For compatibility with low-level network APIs (with 32-bit integers),
    8686        # the chunk size should be < 2^31, but still divisible by 4.
    87         self._chunk_size = min(2**31-4, *[x.chunk_size for x in upload_handlers if x.chunk_size])
     87        self._chunk_size = 2**31-4
     88        if upload_handlers:
     89            self._chunk_size = min(self._chunk_size, *[x.chunk_size for x in upload_handlers if x.chunk_size])
    8890
    8991        self._meta = META
    9092        self._encoding = encoding or settings.DEFAULT_CHARSET
Back to Top