summaryrefslogtreecommitdiff
path: root/django/utils/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/cache.py')
-rw-r--r--django/utils/cache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/cache.py b/django/utils/cache.py
index 2b37acfd44..3ee01a1e94 100644
--- a/django/utils/cache.py
+++ b/django/utils/cache.py
@@ -98,7 +98,7 @@ def get_max_age(response):
def set_response_etag(response):
- if not response.streaming:
+ if not response.streaming and response.content:
response['ETag'] = quote_etag(hashlib.md5(response.content).hexdigest())
return response