This project is archived and is in readonly mode.
add nginx support for :x_sendfile option in file streaming
-
Michael Koziarski
- Milestone cleared.
-
Pratik
- Assigned user changed from Rick to Yehuda Katz (wycats)
- State changed from new to incomplete
Patch please.
-
Vladimir Meremyanin
I think it is better not to "Add config option like: config.action_controller.streaming_header = :apache | :nginx | :lighttpd" but use "config.action_controller.streaming_engine = XAccelRedirect.new | XSendFile.new | PlainStream.new | ..." because XAccelRedirect takes relative url, while XSendFile uses filesystem path. Maybe some other nuances present.
I can code it if no one is working on it at the moment.
-
Rizwan Reza
- Tag set to nginx, server
Vladmir, it doesn't seem anyone else is working on this at the moment. Can you work on a patch for this?
Thanks.
-
Yehuda Katz (wycats)
- State changed from incomplete to resolved
This is a dup of other sendfile related issues. The correct solution is to use the fact that Rack can take a File, and people can use the SendFile middleware in Rack (or we can use it by default) to optimize that case.