Commits

Armin Ronacher committed 3bec75d

Set the content-length header for sendfile. Fixes #447

  • Participants
  • Parent commits de5038f

Comments (0)

Files changed (2)

   :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
 -----------

File flask/helpers.py

         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: