started work on inliner stuff
parent
afcb883c7a
commit
493c40587b
16
inliner.c
16
inliner.c
|
@ -5,3 +5,19 @@
|
|||
* 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
#ifndef __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_TOP 0x02
|
||||
|
@ -69,10 +72,16 @@
|
|||
(((_where) & (_what)) == (_what))
|
||||
|
||||
|
||||
/*
|
||||
* Internal module functions.
|
||||
#include <ngx_http.h>
|
||||
|
||||
/**
|
||||
* 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__ */
|
||||
|
|
Loading…
Reference in New Issue