Using sendfile in module

Kent Karlsson kentk at mac.com
Thu May 6 05:51:15 MSD 2010


Hey,

I'm considering porting a slow cgi to a module for nginx that provides a custom url scheme to access parts of big files and would like to use sendfile to avoid copying all the data to userspace and back again. I looked at X-Accel-Redirect, but it seems to require that I send the entire file, which won't work for me.

I need to understand if it is possible first, so if someone can tell me if it is and maybe give me some code or links to read, that would be much appreciated.

-- kent



More information about the nginx-devel mailing list