summaryrefslogtreecommitdiff
path: root/django/utils/cache.py
diff options
context:
space:
mode:
authorDwight Gunning <dwight@dwightgunning.com>2015-11-07 16:26:38 +0100
committerTim Graham <timograham@gmail.com>2015-11-09 14:26:29 -0500
commit1f29164ced01bde92c72d20d67bc453484a4f078 (patch)
tree0ad75f315d96530ff935ccf991d6c218308f6657 /django/utils/cache.py
parent1155843a41af589a856efe8e671a796866430049 (diff)
downloaddjango-1f29164ced01bde92c72d20d67bc453484a4f078.tar.gz
Fixed #6727 -- Made patch_cache_control() patch an empty Cache-Control header.
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 c8ab96fe3d..eb3aa631ec 100644
--- a/django/utils/cache.py
+++ b/django/utils/cache.py
@@ -63,7 +63,7 @@ def patch_cache_control(response, **kwargs):
else:
return '%s=%s' % (t[0], t[1])
- if response.has_header('Cache-Control'):
+ if response.get('Cache-Control'):
cc = cc_delim_re.split(response['Cache-Control'])
cc = dict(dictitem(el) for el in cc)
else: