summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-05-08 17:22:34 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-05-08 17:22:34 +0000
commitc40f715257b6268cfd96dbafa18e58cbc6602afa (patch)
treece112a7b947ce6794d0fccf0e43ae5d37c4f1768 /django
parent88f5167142f547cbb7b77432803e69a4302d15fe (diff)
Fixed #10687: fixed request parsing when upload_handlers is empty. Thanks, Armin Ronacher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/core/files/base.py1
-rw-r--r--django/http/multipartparser.py3
2 files changed, 2 insertions, 2 deletions
diff --git a/django/core/files/base.py b/django/core/files/base.py
index 9013acf2cc..f9e1c9a0d7 100644
--- a/django/core/files/base.py
+++ b/django/core/files/base.py
@@ -1,5 +1,4 @@
import os
-
try:
from cStringIO import StringIO
except ImportError:
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py
index 048c9aaea2..e45d5d1035 100644
--- a/django/http/multipartparser.py
+++ b/django/http/multipartparser.py
@@ -84,7 +84,8 @@ class MultiPartParser(object):
# For compatibility with low-level network APIs (with 32-bit integers),
# the chunk size should be < 2^31, but still divisible by 4.
- self._chunk_size = min(2**31-4, *[x.chunk_size for x in upload_handlers if x.chunk_size])
+ possible_sizes = [x.chunk_size for x in upload_handlers if x.chunk_size]
+ self._chunk_size = min([2**31-4] + possible_sizes)
self._meta = META
self._encoding = encoding or settings.DEFAULT_CHARSET