Response with mixed file + generated contents
Adrian Perez de Castro
adrianperez at udc.es
Thu Sep 6 22:20:13 MSD 2007
El Thu, 6 Sep 2007 21:44:05 +0400
Igor Sysoev <is at rambler-co.ru> escribió:
> > Can someone confirm that it is ok and Nginx will open and send the
> > file for me? (I will be experimenting myself in the meanwhile, too).
> No, nginx does not open the file by itself. See ngx_http_static_module
> that sends files.
Thanks for the confirmation, I also noticed that by myself some minutes
ago when testing some proof-of-concept code.
> > Also, will Nginx notice I filled in the "buffer->file" member and
> > use "sendfile()" if possible? (or any other method which the server
> > will consider "optimal").
> If sendfile is enabled and file content is not needed to be in memory
> (gzip, ssi, charset, etc.) then the content will be sent via
I will remember about this, just in case.
> However, it's better to include header/footer via subrequest as Evan
> has suggested.
I think subrequests are a good hint, I peeked a bit at the code
in the addition module as Evan suggested and I think I will be able of
using subrequests without too much trouble.
Thanks again to you both, as I did not expect such a quick response.
I will try make my module as good as possible. Cheers,
P.S. Having to google-translate the newer bits of documentation
from Russian is sometimes funny because of the automatic translation,
but I took a look at the mailing list archives and I feel like people
is very kind here, and that's great ;-)
Adrian Perez de Castro <adrianperez at udc.es>
Oficina de Software Libre http://softwarelibre.udc.es
Universidade da Coruña http://www.udc.es
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: not available
More information about the nginx