From ae36e6303df82656a8bdee4501b50d20537a9c53 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sat, 10 Feb 2007 03:56:21 +0000 Subject: [PATCH] Fixed #3437 -- Fixed incorrect logic in django.http.HttpResponse calculation of _is_string. Thanks, Brian Harring git-svn-id: http://code.djangoproject.com/svn/django/trunk@4472 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/http/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/http/__init__.py b/django/http/__init__.py index 48f10329fd..a6538b7d4a 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -160,7 +160,7 @@ class HttpResponse(object): self._charset = settings.DEFAULT_CHARSET if not mimetype: mimetype = "%s; charset=%s" % (settings.DEFAULT_CONTENT_TYPE, settings.DEFAULT_CHARSET) - if hasattr(content, '__iter__'): + if not isinstance(content, basestring) and hasattr(content, '__iter__'): self._container = content self._is_string = False else: