# HG changeset patch # User Igor Sysoev # Date 1075187319 0 # Node ID 3bfa496bc22ec2261ce91204aab609e3479e1bb6 # Parent 725129fdd524cf29985b0972ca9b75dc271a6d1e nginx-0.0.1-2004-01-27-10:08:39 import diff --git a/src/http/modules/ngx_http_ssi_filter.c b/src/http/modules/ngx_http_ssi_filter.c --- a/src/http/modules/ngx_http_ssi_filter.c +++ b/src/http/modules/ngx_http_ssi_filter.c @@ -16,6 +16,7 @@ typedef struct { int enable; + ssize_t value_len; } ngx_http_ssi_conf_t; @@ -26,21 +27,41 @@ typedef struct { char *last; char *pos; - ngx_table_elt_t *param; ngx_str_t command; ngx_array_t params; - int state; + ngx_table_elt_t *param; ngx_chain_t *in; - ngx_chain_t *current; ngx_chain_t *out; ngx_chain_t **last_out; ngx_chain_t *busy; - size_t prev; + int state; + size_t saved; + ngx_int_t err; +} ngx_http_ssi_ctx_t; + - u_int value_len; -} ngx_http_ssi_ctx_t; +typedef enum { + ssi_start_state = 0, + ssi_tag_state, + ssi_comment0_state, + ssi_comment1_state, + ssi_sharp_state, + ssi_precommand_state, + ssi_command_state, + ssi_preparam_state, + ssi_param_state, + ssi_preequal_state, + ssi_prevalue_state, + ssi_double_quoted_value_state, + ssi_double_quoted_value_quote_state, + ssi_quoted_value_state, + ssi_quoted_value_quote_state, + ssi_error_state, + ssi_comment_end0_state, + ssi_comment_end1_state +} ngx_http_ssi_state_e; static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r, @@ -94,7 +115,7 @@ static int (*ngx_http_next_body_filter) -static char comment_string[] = "