diff options
author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-10-20 17:40:14 +0200 |
---|---|---|
committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-10-20 20:05:11 +0200 |
commit | 4b27813198ae31892f1159d437e492f7745761a0 (patch) | |
tree | 99796c5b894375ac405b5205d4d675caac258136 /django/utils/cache.py | |
parent | 300d052713a4312bcfca334ea34b348d57549950 (diff) | |
download | django-4b27813198ae31892f1159d437e492f7745761a0.tar.gz |
Fixed #7581 -- Added streaming responses.
Thanks mrmachine and everyone else involved on this long-standing ticket.
Diffstat (limited to 'django/utils/cache.py')
-rw-r--r-- | django/utils/cache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/utils/cache.py b/django/utils/cache.py index 91c4796988..0fceaa96e6 100644 --- a/django/utils/cache.py +++ b/django/utils/cache.py @@ -95,7 +95,8 @@ def get_max_age(response): pass def _set_response_etag(response): - response['ETag'] = '"%s"' % hashlib.md5(response.content).hexdigest() + if not response.streaming: + response['ETag'] = '"%s"' % hashlib.md5(response.content).hexdigest() return response def patch_response_headers(response, cache_timeout=None): |