From e77c0c359903cd94e43db8cc872778d3269f8d53 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 8 Aug 2003 15:13:24 +0000 Subject: nginx-0.0.1-2003-08-08-19:13:24 import --- src/http/modules/ngx_http_ssi_filter.c | 210 ++++++++++++++++++++++++++++----- 1 file changed, 182 insertions(+), 28 deletions(-) (limited to 'src/http/modules') diff --git a/src/http/modules/ngx_http_ssi_filter.c b/src/http/modules/ngx_http_ssi_filter.c index a2ea85ba3..857a8526e 100644 --- a/src/http/modules/ngx_http_ssi_filter.c +++ b/src/http/modules/ngx_http_ssi_filter.c @@ -4,8 +4,27 @@ #include +#define NGX_HTTP_SSI_COMMAND_LEN 31 +#define NGX_HTTP_SSI_PARAM_LEN 31 + +#define NGX_HTTP_SSI_DONE 1 +#define NGX_HTTP_SSI_INVALID_COMMAND 2 +#define NGX_HTTP_SSI_INVALID_PARAM 3 +#define NGX_HTTP_SSI_INVALID_VALUE 4 +#define NGX_HTTP_SSI_LONG_VALUE 5 + + typedef struct { -} ngx_http_ssi_filter_ctx_t; + ngx_table_elt_t *param; + ngx_str_t command; + ngx_array_t params; + int state; + int looked; + char *pos; + ngx_chain_t *out; + int new_hunk; + u_int value_len; +} ngx_http_ssi_ctx_t; static int ngx_http_ssi_filter_init(ngx_cycle_t *cycle); @@ -37,12 +56,49 @@ static int (*next_header_filter) (ngx_http_request_t *r); static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); -static comment_string = "