Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

I think it should check that cache_timeout is not None to allow for a…

… (I hope legale) value of 0 for such parameter.
  • Loading branch information...
commit 4b21e2d38ccf66f236c5f1c8a10bd9d7904f2599 1 parent 9f05510
@mapio mapio authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  flask/helpers.py
View
2  flask/helpers.py
@@ -533,7 +533,7 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
rv.cache_control.public = True
if cache_timeout is None:
cache_timeout = current_app.get_send_file_max_age(filename)
- if cache_timeout:
+ if cache_timeout is not None:
rv.cache_control.max_age = cache_timeout
rv.expires = int(time() + cache_timeout)
Please sign in to comment.
Something went wrong with that request. Please try again.