diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-08-14 16:15:39 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-08-14 16:15:50 +0200 |
| commit | c35501a1280e02638c0e5bf2530cb48e15a68ad0 (patch) | |
| tree | 4ce854833f85e41c8df51258d0ee543b66f811b7 | |
| parent | a351e383b664d4b2da6d49a50c9a3c37ae2c5848 (diff) | |
[py3] Fixed HttpResponse when initialized with bytes
| -rw-r--r-- | django/http/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py index 62415da3c6..930e84cddc 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -676,7 +676,7 @@ class HttpResponse(object): 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: |
