aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/request.py
diff options
context:
space:
mode:
authorXavier Ordoquy2012-11-22 07:48:41 +0100
committerXavier Ordoquy2012-11-22 07:48:41 +0100
commitbe003145ca120708db51db4e85f6088bde8dce1c (patch)
tree9df0e343b9adc196ddd7e5fbc1b93e4c339260b2 /rest_framework/request.py
parent91190487b747f0c9c09ecd5678f719bb2e745d27 (diff)
parent606c20f012c5a1fdcfd661eb280bab22b94afcf5 (diff)
downloaddjango-rest-framework-be003145ca120708db51db4e85f6088bde8dce1c.tar.bz2
Merge branch 'p3k' of github.com:linovia/django-rest-framework into p3k
Diffstat (limited to 'rest_framework/request.py')
-rw-r--r--rest_framework/request.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/request.py b/rest_framework/request.py
index a1827ba4..d0c4ded6 100644
--- a/rest_framework/request.py
+++ b/rest_framework/request.py
@@ -9,7 +9,7 @@ The wrapped request then offers a richer API, in particular :
- full support of PUT method, including support for file uploads
- form overloading of HTTP method, content type and content
"""
-from StringIO import StringIO
+from rest_framework.compat import StringIO
from django.http.multipartparser import parse_header
from rest_framework import exceptions
@@ -20,7 +20,7 @@ def is_form_media_type(media_type):
"""
Return True if the media type is a valid form media type.
"""
- base_media_type, params = parse_header(media_type)
+ base_media_type, params = parse_header(media_type.encode('utf8'))
return (base_media_type == 'application/x-www-form-urlencoded' or
base_media_type == 'multipart/form-data')