Skip to content


Subversion checkout URL

You can clone with
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...
1 parent 9f05510 commit 4b21e2d38ccf66f236c5f1c8a10bd9d7904f2599 @mapio mapio committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  flask/
2  flask/
@@ -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)

0 comments on commit 4b21e2d

Please sign in to comment.
Something went wrong with that request. Please try again.