Skip to content
This repository
Browse code

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
Massimo Santini authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  flask/helpers.py
2  flask/helpers.py
@@ -533,7 +533,7 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
533 533
     rv.cache_control.public = True
534 534
     if cache_timeout is None:
535 535
         cache_timeout = current_app.get_send_file_max_age(filename)
536  
-    if cache_timeout:
  536
+    if cache_timeout is not None:
537 537
         rv.cache_control.max_age = cache_timeout
538 538
         rv.expires = int(time() + cache_timeout)
539 539
 

0 notes on commit 4b21e2d

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