Skip to content
Browse files

[py3] Fixed HttpResponse when initialized with bytes

  • Loading branch information...
1 parent a351e38 commit c35501a1280e02638c0e5bf2530cb48e15a68ad0 @claudep claudep committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/http/
2 django/http/
@@ -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

0 comments on commit c35501a

Please sign in to comment.
Something went wrong with that request. Please try again.