diff options
| author | Tim Graham <timograham@gmail.com> | 2016-05-06 10:27:43 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-05-06 10:30:03 -0400 |
| commit | 086510fde00d8246be3c7cdbd268742ece8cc401 (patch) | |
| tree | 287131225939a226bb8f6f67828a5eb6cc8fd554 /django/http/multipartparser.py | |
| parent | bbfad84dd980a97174c3b061a3d1b5f1373c380d (diff) | |
Removed HTTP prefixed CONTENT_TYPE/LENGTH headers in MultiPartParser.
The docs say that these headers always appear without the HTTP_ prefix.
This may have been an oversight when they were added in
d725cc9734272f867d41f7236235c28b3931a1b2, the only commit that uses
these names.
Diffstat (limited to 'django/http/multipartparser.py')
| -rw-r--r-- | django/http/multipartparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py index e61eee9200..b54eaca976 100644 --- a/django/http/multipartparser.py +++ b/django/http/multipartparser.py @@ -68,7 +68,7 @@ class MultiPartParser(object): # Content-Type should contain multipart and the boundary information. # - content_type = META.get('HTTP_CONTENT_TYPE', META.get('CONTENT_TYPE', '')) + content_type = META.get('CONTENT_TYPE', '') if not content_type.startswith('multipart/'): raise MultiPartParserError('Invalid Content-Type: %s' % content_type) @@ -81,7 +81,7 @@ class MultiPartParser(object): # Content-Length should contain the length of the body we are about # to receive. try: - content_length = int(META.get('HTTP_CONTENT_LENGTH', META.get('CONTENT_LENGTH', 0))) + content_length = int(META.get('CONTENT_LENGTH', 0)) except (ValueError, TypeError): content_length = 0 |
