annotate src/http/modules/ngx_http_ssi_filter_module.h @ 340:10cc350ed8a1 NGINX_0_6_14

nginx 0.6.14 *) Change: now by default the "echo" SSI command uses entity encoding. *) Feature: the "encoding" parameter in the "echo" SSI command. *) Feature: the "access_log" directive may be used inside the "limit_except" block. *) Bugfix: if all upstream servers were failed, then all servers had got weight the was equal one until servers became alive; bug appeared in 0.6.6. *) Bugfix: a segmentation fault occurred in worker process if $date_local and $date_gmt were used outside the ngx_http_ssi_filter_module. *) Bugfix: a segmentation fault might occur in worker process if debug log was enabled. Thanks to Andrei Nigmatulin. *) Bugfix: ngx_http_memcached_module did not set $upstream_response_time. Thanks to Maxim Dounin. *) Bugfix: a worker process may got caught in an endless loop, if the memcached was used. *) Bugfix: nginx supported low case only "close" and "keep-alive" values in the "Connection" request header line; bug appeared in 0.6.11. *) Bugfix: sub_filter did not work with empty substitution. *) Bugfix: in sub_filter parsing.
author Igor Sysoev <http://sysoev.ru>
date Mon, 15 Oct 2007 00:00:00 +0400
parents acd2ec3541cb
children 9d21dad0b5a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
1
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
2 /*
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
4 */
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
5
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
6
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
7 #ifndef _NGX_HTTP_SSI_FILTER_H_INCLUDED_
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #define _NGX_HTTP_SSI_FILTER_H_INCLUDED_
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
10
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
11 #include <ngx_config.h>
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_core.h>
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13 #include <ngx_http.h>
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
15
340
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
16 #define NGX_HTTP_SSI_MAX_PARAMS 16
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
17
340
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
18 #define NGX_HTTP_SSI_COMMAND_LEN 32
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
19 #define NGX_HTTP_SSI_PARAM_LEN 32
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
20 #define NGX_HTTP_SSI_PARAMS_N 4
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
21
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
22
340
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
23 #define NGX_HTTP_SSI_COND_IF 1
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
24 #define NGX_HTTP_SSI_COND_ELSE 2
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
25
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
26
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
27 #define NGX_HTTP_SSI_NO_ENCODING 0
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
28 #define NGX_HTTP_SSI_URL_ENCODING 1
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
29 #define NGX_HTTP_SSI_ENTITY_ENCODING 2
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
30
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
31
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
32 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
33 ngx_hash_t hash;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34 ngx_hash_keys_arrays_t commands;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
35 } ngx_http_ssi_main_conf_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39 ngx_buf_t *buf;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
41 u_char *pos;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
42 u_char *copy_start;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
43 u_char *copy_end;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
44
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
45 ngx_uint_t key;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
46 ngx_str_t command;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
47 ngx_array_t params;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
48 ngx_table_elt_t *param;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
49 ngx_table_elt_t params_array[NGX_HTTP_SSI_PARAMS_N];
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
50
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
51 ngx_chain_t *in;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
52 ngx_chain_t *out;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
53 ngx_chain_t **last_out;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
54 ngx_chain_t *busy;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
55 ngx_chain_t *free;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
56
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
57 ngx_uint_t state;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
58 ngx_uint_t saved_state;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
59 size_t saved;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
60 size_t looked;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
61
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
62 size_t value_len;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
63
248
acd2ec3541cb nginx 0.4.9
Igor Sysoev <http://sysoev.ru>
parents: 244
diff changeset
64 ngx_list_t *variables;
216
fa32d59d9a15 nginx 0.3.55
Igor Sysoev <http://sysoev.ru>
parents: 194
diff changeset
65 ngx_array_t *blocks;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
66
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
67 unsigned conditional:2;
340
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 248
diff changeset
68 unsigned encoding:2;
216
fa32d59d9a15 nginx 0.3.55
Igor Sysoev <http://sysoev.ru>
parents: 194
diff changeset
69 unsigned block:1;
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
70 unsigned output:1;
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
71 unsigned output_chosen:1;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
72
244
500a3242dff6 nginx 0.4.7
Igor Sysoev <http://sysoev.ru>
parents: 216
diff changeset
73 ngx_http_request_t *wait;
158
2d15b82126ed nginx 0.3.26
Igor Sysoev <http://sysoev.ru>
parents: 146
diff changeset
74 void *value_buf;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
75 ngx_str_t timefmt;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
76 ngx_str_t errmsg;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
77 } ngx_http_ssi_ctx_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
78
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
79
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
80 typedef ngx_int_t (*ngx_http_ssi_command_pt) (ngx_http_request_t *r,
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
81 ngx_http_ssi_ctx_t *ctx, ngx_str_t **);
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
82
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
83
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
84 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
85 ngx_str_t name;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
86 ngx_uint_t index;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
87
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
88 unsigned mandatory:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
89 unsigned multiple:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
90 } ngx_http_ssi_param_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
91
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
92
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
93 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
94 ngx_str_t name;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
95 ngx_http_ssi_command_pt handler;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
96 ngx_http_ssi_param_t *params;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
97
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
98 unsigned conditional:2;
216
fa32d59d9a15 nginx 0.3.55
Igor Sysoev <http://sysoev.ru>
parents: 194
diff changeset
99 unsigned block:1;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
100 unsigned flush:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
101 } ngx_http_ssi_command_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
102
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
103
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
104 extern ngx_module_t ngx_http_ssi_filter_module;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
105
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
106
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
107 #endif /* _NGX_HTTP_SSI_FILTER_H_INCLUDED_ */