started work on inliner stuff

pull/4/head
Adrian Perez 2007-09-04 21:00:48 +02:00
parent afcb883c7a
commit 493c40587b
2 changed files with 28 additions and 3 deletions

View File

@ -5,3 +5,19 @@
* Distributed under terms of the MIT license. * Distributed under terms of the MIT license.
*/ */
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
ngx_buf_t* nfi_inline_getbuf(ngx_http_request_t *r,
const ngx_str_t const * path, ngx_int_t mode)
{
ngx_buf_t *b;
if ((b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t))) == NULL)
return NULL;
return b;
}

View File

@ -8,6 +8,9 @@
#ifndef __ngx_http_fancyindex_module_h__ #ifndef __ngx_http_fancyindex_module_h__
#define __ngx_http_fancyindex_module_h__ #define __ngx_http_fancyindex_module_h__
#include <ngx_config.h>
#include <ngx_core.h>
#define NGX_HTTP_FANCYINDEX_README_ASIS 0x01 #define NGX_HTTP_FANCYINDEX_README_ASIS 0x01
#define NGX_HTTP_FANCYINDEX_README_TOP 0x02 #define NGX_HTTP_FANCYINDEX_README_TOP 0x02
@ -69,10 +72,16 @@
(((_where) & (_what)) == (_what)) (((_where) & (_what)) == (_what))
/* #include <ngx_http.h>
* Internal module functions.
/**
* Get a buffer out of a file name. The buffer will be ready to add to
* a processing chain (an ngx_chain_t). The "mode" determines how the file
* will be searched for, it ca be either NGX_HTTP_FANCYINDEX_INCLUDE_STATIC
* or NGX_HTTP_FANCYINDEX_INCLUDE_CACHED.
*/ */
void nfi_inliner_init(void); ngx_buf_t* nfi_inline_getbuf(ngx_http_request_t *req,
const ngx_str_t const * path, ngx_int_t mode);
#endif /* !__ngx_http_fancyindex_module_h__ */ #endif /* !__ngx_http_fancyindex_module_h__ */