summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/http/request.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/http/request.py b/django/http/request.py
index f3754ba2ff..0ea423d080 100644
--- a/django/http/request.py
+++ b/django/http/request.py
@@ -264,7 +264,7 @@ class HttpRequest(object):
# Limit the maximum request data size that will be handled in-memory.
if (settings.DATA_UPLOAD_MAX_MEMORY_SIZE is not None and
- int(self.META.get('CONTENT_LENGTH', 0)) > settings.DATA_UPLOAD_MAX_MEMORY_SIZE):
+ int(self.META.get('CONTENT_LENGTH') or 0) > settings.DATA_UPLOAD_MAX_MEMORY_SIZE):
raise RequestDataTooBig('Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE.')
try: