mitsuhiko/flask — pull request #447 by ib-lundgren (2012-03-18 19:17:45+00:00)
Title: Added content length to xsendfile

Attempting to download large files using send_file with X-Sendfile headers did not work with Python 2.7.2, Apache 2.2.20 on Ubuntu 11.10, only an empty file was downloaded. Setting the "Content-Length" header solved the issue. I can't see why it would hurt to have it there always since response content is discarded when using X-Sendfile anyway.