diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-10-06 02:27:08 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-10-06 02:27:08 +0000 |
| commit | ab9aacd4db5d1e69ff2c78bae69fcabe5252d395 (patch) | |
| tree | d09b59dfbf42b700223f474937fb27fd9d02ea2a /django/middleware | |
| parent | 261ab166cef09497ab2204442e74246758341135 (diff) | |
Fixed #333 and #440 -- Split DEFAULT_MIME_TYPE setting into DEFAULT_CONTENT_TYPE and DEFAULT_CHARSET. Thanks, Maniac.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/middleware')
| -rw-r--r-- | django/middleware/cache.py | 2 | ||||
| -rw-r--r-- | django/middleware/common.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/django/middleware/cache.py b/django/middleware/cache.py index f3d03e657a..7f4057eec7 100644 --- a/django/middleware/cache.py +++ b/django/middleware/cache.py @@ -76,7 +76,7 @@ class CacheMiddleware: Sets the cache, if needed. """ if request._cache_middleware_set_cache: - content = response.get_content_as_string('utf-8') + content = response.get_content_as_string(settings.DEFAULT_CHARSET) if request._cache_middleware_accepts_gzip: content = compress_string(content) response.content = content diff --git a/django/middleware/common.py b/django/middleware/common.py index 4abe4ee236..e794477b62 100644 --- a/django/middleware/common.py +++ b/django/middleware/common.py @@ -76,7 +76,7 @@ class CommonMiddleware: # Use ETags, if requested. if settings.USE_ETAGS: - etag = md5.new(response.get_content_as_string('utf-8')).hexdigest() + etag = md5.new(response.get_content_as_string(settings.DEFAULT_CHARSET)).hexdigest() if request.META.get('HTTP_IF_NONE_MATCH') == etag: response = httpwrappers.HttpResponseNotModified() else: |
