diff --git a/rest_framework_proxy/utils.py b/rest_framework_proxy/utils.py index b0e9453..2f3636c 100644 --- a/rest_framework_proxy/utils.py +++ b/rest_framework_proxy/utils.py @@ -48,15 +48,15 @@ def generator(self): def build_multipart_header(self, name, filename=None, content_type=None): output = [] - output.append('--%s' % self.boundary) + output.append(('--%s' % self.boundary).encode('utf-8')) string = 'Content-Disposition: form-data; name="%s"' % name if filename: string += '; filename="%s"' % filename - output.append(string) + output.append(string.encode('utf-8')) if content_type: - output.append('Content-Type: %s' % content_type) + output.append(('Content-Type: %s' % content_type).encode('utf-8')) return '\r\n'.join(output)