forked from orbit-oss/flask
I think it should check that cache_timeout is not None to allow for a (I hope legale) value of 0 for such parameter.
This commit is contained in:
parent
9f055104ad
commit
4b21e2d38c
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue