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 14:01:08 -0400
commitdcebeea2703322bc53c511bf3cff9e3c2e04d802 (patch)
tree3985a8cf6eac12c37327ba97ddaff507b8e3bb83 /django/http/request.py
parent348406c381f8f574bcc4c74c62279060010ae35f (diff)
[1.10.x] Fixed #27005 -- Fixed crash if request.META[''CONTENT_LENGTH']=''.
Backport of 5c63b3e5a797102d915e1683971517f747a28013 from master
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 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: