summaryrefslogtreecommitdiff
path: root/django/http/multipartparser.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2019-03-01 12:53:18 -0500
committerTim Graham <timograham@gmail.com>2019-03-02 09:19:05 -0500
commit2ed2acf872b87d1149da98ceeb96997f23258e83 (patch)
tree8c45183fc6666c0406bd7288f8c66ba64a6a36f7 /django/http/multipartparser.py
parent8a2ec55b180d3fddf4578de2e6759127c8250ce7 (diff)
downloaddjango-2ed2acf872b87d1149da98ceeb96997f23258e83.tar.gz
Fixed #30227 -- Fixed crash on request without boundary in Content-Type.
Diffstat (limited to 'django/http/multipartparser.py')
-rw-r--r--django/http/multipartparser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py
index 958b519dc3..526e161ae4 100644
--- a/django/http/multipartparser.py
+++ b/django/http/multipartparser.py
@@ -70,7 +70,7 @@ class MultiPartParser:
ctypes, opts = parse_header(content_type.encode('ascii'))
boundary = opts.get('boundary')
if not boundary or not cgi.valid_boundary(boundary):
- raise MultiPartParserError('Invalid boundary in multipart: %s' % boundary.decode())
+ raise MultiPartParserError('Invalid boundary in multipart: %s' % force_str(boundary))
# Content-Length should contain the length of the body we are about
# to receive.