From a530ef1cd85fbb11175bad6156f88bb9c7f4a2dc Mon Sep 17 00:00:00 2001 From: Adrian Perez Date: Wed, 5 Sep 2007 15:47:22 +0200 Subject: [PATCH] Implemented setup of buffer flags so nginx knows where to read the file from. --- inliner.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inliner.c b/inliner.c index f5c6ea9..bf39a4e 100644 --- a/inliner.c +++ b/inliner.c @@ -63,6 +63,14 @@ ngx_buf_t* nfi_inline_getbuf(ngx_http_request_t *r, if (buf == NULL) return NULL; + /* + * ngx_pcalloc() makes zeros, which are good defaults for most values, we + * tell nginx that the file is on-disk, not in memory, and we associate + * the corresponding file information (ngx_file_t) structure. + */ + buf->file = bfile; + buf->in_file = 1; + return buf; }