summaryrefslogtreecommitdiff
path: root/pip/_vendor/cachecontrol/controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'pip/_vendor/cachecontrol/controller.py')
-rw-r--r--pip/_vendor/cachecontrol/controller.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pip/_vendor/cachecontrol/controller.py b/pip/_vendor/cachecontrol/controller.py
index 6e591f8b0..5eb961f85 100644
--- a/pip/_vendor/cachecontrol/controller.py
+++ b/pip/_vendor/cachecontrol/controller.py
@@ -290,7 +290,7 @@ class CacheController(object):
elif 'date' in response_headers:
# cache when there is a max-age > 0
if cc and cc.get('max-age'):
- if int(cc['max-age']) > 0:
+ if cc['max-age'].isdigit() and int(cc['max-age']) > 0:
logger.debug('Caching b/c date exists and max-age > 0')
self.cache.set(
cache_url,