src/http/modules/download/ngx_http_filesync.c File Reference

#include "ngx_http_filesync.h"

Go to the source code of this file.

Functions

static  ngx_buf_t * ngx_http_filesync_get_buf (ngx_http_request_t *r, ngx_int_t max_size)
 Allocates buffer.
static ngx_int_t ngx_http_filesync_read (ngx_http_request_t *r, ngx_buf_t *src, ngx_buf_t *dst)
 Reads content of a file buffer and copy it to a memory buffer.
ngx_int_t ngx_http_filesync_get (ngx_http_request_t *r, ngx_str_t *uri, ngx_chain_t **res)
 Opens and reads the file; returns the result as chain link.

Function Documentation

ngx_int_t ngx_http_filesync_get ( ngx_http_request_t *  r,
ngx_str_t *  uri,
ngx_chain_t **  res 
)

Opens and reads the file; returns the result as chain link.

Parameters:
r nginx http request
uri uri to file - relative to html root
res pointer to the result
Returns:
NGX_*

Definition at line 38 of file ngx_http_filesync.c.

References ngx_http_filesync_get_buf(), and ngx_http_filesync_read().

Referenced by ngx_http_xslt2_xml_get_local_stylesheet(), and ngx_http_xxslt_parse_get_local_include().

static ngx_buf_t * ngx_http_filesync_get_buf ( ngx_http_request_t *  r,
ngx_int_t  max_size 
) [static]

Allocates buffer.

Parameters:
r nginx http request
max_size maximum size of new buffer

Definition at line 286 of file ngx_http_filesync.c.

References NGX_HTTP_FILESYNC_MAX_BUF.

Referenced by ngx_http_filesync_get().

static ngx_int_t ngx_http_filesync_read ( ngx_http_request_t *  r,
ngx_buf_t *  src,
ngx_buf_t *  dst 
) [static]

Reads content of a file buffer and copy it to a memory buffer.

Parameters:
r nginx http request
src source buffer (in file)
dst destination buffer (allocated in memory)
Returns:
NGX_*

Definition at line 230 of file ngx_http_filesync.c.

Referenced by ngx_http_filesync_get().


Generated on Mon Oct 12 14:03:36 2009 for XXSLT by  doxygen 1.6.1