diff options
| author | Xavier Ordoquy | 2012-11-22 07:48:41 +0100 |
|---|---|---|
| committer | Xavier Ordoquy | 2012-11-22 07:48:41 +0100 |
| commit | be003145ca120708db51db4e85f6088bde8dce1c (patch) | |
| tree | 9df0e343b9adc196ddd7e5fbc1b93e4c339260b2 /rest_framework/request.py | |
| parent | 91190487b747f0c9c09ecd5678f719bb2e745d27 (diff) | |
| parent | 606c20f012c5a1fdcfd661eb280bab22b94afcf5 (diff) | |
| download | django-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.py | 4 |
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') |
