summaryrefslogtreecommitdiff
path: root/django/http/request.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-08-03 12:46:57 -0400
committerTim Graham <timograham@gmail.com>2016-08-03 13:12:40 -0400
commit5c63b3e5a797102d915e1683971517f747a28013 (patch)
tree789eb4d55cb67eeebb7c8fe002fe1d4c22dabbcc /django/http/request.py
parent4a696bbe13383b14b2762cc5accd45849e9dcfba (diff)
downloaddjango-5c63b3e5a797102d915e1683971517f747a28013.tar.gz
Fixed #27005 -- Fixed crash if request.META[''CONTENT_LENGTH']=''.
Diffstat (limited to 'django/http/request.py')
-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 84230be6e0..1dedf5d899 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: