#385 √ resolved
Jonathan Stott (namelessjon)

nginx_send_file is broken (and also wrong)

Reported by Jonathan Stott (namelessjon) | June 27th, 2008 @ 11:14 PM | in 0.9.4

nginx_send_file in the current implementation is broken, and also wrong.

The current implementation returns nil at the end of the method and is usually the only method in the controller method which uses it, therefore passing nil back to mongrel, which then makes it complain when it tries to call .each on nil.

It's also wrong, in that the X-Accel-Redirect path should be relative to the root of the location defined in nginx and probably never an absolute path.

Attached is a patch to fix this. (Although given it makes nginx_send_file a one-liner, it might almost be easier to just remove the method)

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Attachments