diff options
author | Tim Graham <timograham@gmail.com> | 2016-08-03 12:46:57 -0400 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-08-03 13:12:40 -0400 |
commit | 5c63b3e5a797102d915e1683971517f747a28013 (patch) | |
tree | 789eb4d55cb67eeebb7c8fe002fe1d4c22dabbcc /django/http/request.py | |
parent | 4a696bbe13383b14b2762cc5accd45849e9dcfba (diff) | |
download | django-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.py | 2 |
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: |