I'm not sure this is a generally safe change. Is this what Flask's send_file (http://flask.pocoo.org/docs/api/?highlight=send_file#flask.send_file) does?