comparison src/http/modules/ngx_http_ssi_filter_module.h @ 146:36af50a5582d NGINX_0_3_20

nginx 0.3.20 *) Bugfix: in SSI handling. *) Bugfix: the ngx_http_memcached_module did not support the keys in the "/usr?args" form.
author Igor Sysoev <http://sysoev.ru>
date Wed, 11 Jan 2006 00:00:00 +0300
parents
children 2d15b82126ed
comparison
equal deleted inserted replaced
145:85a84f8da62b 146:36af50a5582d
1
2 /*
3 * Copyright (C) Igor Sysoev
4 */
5
6
7 #ifndef _NGX_HTTP_SSI_FILTER_H_INCLUDED_
8 #define _NGX_HTTP_SSI_FILTER_H_INCLUDED_
9
10
11 #include <ngx_config.h>
12 #include <ngx_core.h>
13 #include <ngx_http.h>
14
15
16 #define NGX_HTTP_SSI_MAX_PARAMS 16
17
18 #define NGX_HTTP_SSI_COMMAND_LEN 31
19 #define NGX_HTTP_SSI_PARAM_LEN 31
20 #define NGX_HTTP_SSI_PARAMS_N 4
21
22
23 typedef struct {
24 ngx_hash_t hash;
25 ngx_hash_keys_arrays_t commands;
26 } ngx_http_ssi_main_conf_t;
27
28
29 typedef struct {
30 ngx_buf_t *buf;
31
32 u_char *pos;
33 u_char *copy_start;
34 u_char *copy_end;
35
36 ngx_uint_t key;
37 ngx_str_t command;
38 ngx_array_t params;
39 ngx_table_elt_t *param;
40 ngx_table_elt_t params_array[NGX_HTTP_SSI_PARAMS_N];
41
42 ngx_chain_t *in;
43 ngx_chain_t *out;
44 ngx_chain_t **last_out;
45 ngx_chain_t *busy;
46 ngx_chain_t *free;
47
48 ngx_uint_t state;
49 ngx_uint_t saved_state;
50 size_t saved;
51 size_t looked;
52
53 size_t value_len;
54
55 ngx_array_t variables;
56
57 ngx_uint_t output; /* unsigned output:1; */
58
59 ngx_str_t timefmt;
60 ngx_str_t errmsg;
61 } ngx_http_ssi_ctx_t;
62
63
64 typedef ngx_int_t (*ngx_http_ssi_command_pt) (ngx_http_request_t *r,
65 ngx_http_ssi_ctx_t *ctx, ngx_str_t **);
66
67
68 typedef struct {
69 ngx_str_t name;
70 ngx_uint_t index;
71
72 unsigned mandatory:1;
73 unsigned multiple:1;
74 } ngx_http_ssi_param_t;
75
76
77 typedef struct {
78 ngx_str_t name;
79 ngx_http_ssi_command_pt handler;
80 ngx_http_ssi_param_t *params;
81
82 unsigned conditional:1;
83 unsigned flush:1;
84 } ngx_http_ssi_command_t;
85
86
87 extern ngx_module_t ngx_http_ssi_filter_module;
88
89
90 #endif /* _NGX_HTTP_SSI_FILTER_H_INCLUDED_ */