Open jirikuncar opened 8 years ago
It would be definitely useful regarding scalability. Otherwise, serving files from the Python app directly, would basically mean blocking one WSGI worker process until the file transfer is over... This could make the whole system unresponsive in the case of user storms or when transferring really big files.
Should be pretty easy to implement: https://github.com/pallets/flask/blob/master/flask/helpers.py#L516-L521
And we should just rely on Flask's default behaviour with USE_X_SENDFILE
.
We are however recommending using Nginx today (via our docker recipes), and Nginx uses X-Accel-Redirect
instead of X-Sendfile
:
https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/#
@jirikuncar commented on Fri Sep 18 2015
Is there any interest on having this feature implemented here? @inveniosoftware/triagers