Revision 34bd6588
b/snf-django-lib/snf_django/lib/api/__init__.py | ||
---|---|---|
189 | 189 |
response["Date"] = format_date_time(time()) |
190 | 190 |
|
191 | 191 |
if not response.has_header("Content-Length"): |
192 |
if response._is_string: |
|
192 |
_is_string = getattr(response, '_is_string', None) # Django==1.2 |
|
193 |
_base_content_is_iter = getattr(response, '_base_content_is_iter', |
|
194 |
None) |
|
195 |
if (_is_string is not None and _is_string) or\ |
|
196 |
(_base_content_is_iter is not None and |
|
197 |
not _base_content_is_iter): |
|
193 | 198 |
response["Content-Length"] = len(response.content) |
194 | 199 |
else: |
195 | 200 |
if not (response.has_header('Content-Type') and |
Also available in: Unified diff