Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[py3] Fixed HttpResponse when initialized with bytes

  • Loading branch information...
commit c35501a1280e02638c0e5bf2530cb48e15a68ad0 1 parent a351e38
@claudep claudep authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/http/__init__.py
View
2  django/http/__init__.py
@@ -676,7 +676,7 @@ def _get_content(self):
return b''.join([smart_bytes(e, self._charset) for e in self._container])
def _set_content(self, value):
- if hasattr(value, '__iter__') and not isinstance(value, six.string_types):
+ if hasattr(value, '__iter__') and not isinstance(value, (bytes, six.string_types)):
self._container = value
self._base_content_is_iter = True
else:
Please sign in to comment.
Something went wrong with that request. Please try again.