diff --git a/CHANGES b/CHANGES index be7ede79..0c7a8e1e 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,7 @@ Release date to be decided. :ref:`upgrading-to-010` for more information. - Added ``template_test`` methods in addition to the already existing ``template_filter`` method family. +- Set the content-length header for x-sendfile. Version 0.9 ----------- diff --git a/flask/helpers.py b/flask/helpers.py index b2d34a71..07c8add2 100644 --- a/flask/helpers.py +++ b/flask/helpers.py @@ -541,6 +541,7 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False, if file is not None: file.close() headers['X-Sendfile'] = filename + headers['Content-Length'] = os.path.getsize(filename) data = None else: if file is None: