annotate src/http/modules/ngx_http_ssi_filter_module.h @ 216:fa32d59d9a15 NGINX_0_3_55

nginx 0.3.55 *) Feature: the "stub" parameter in the "include" SSI command. *) Feature: the "block" SSI command. *) Feature: the unicode2nginx script was added to contrib. *) Bugfix: if a "root" was specified by variable only, then the root was relative to a server prefix. *) Bugfix: if the request contained "//" or "/./" and escaped symbols after them, then the proxied request was sent unescaped. *) Bugfix: the $r->headers_in("Cookie") of the ngx_http_perl_module now returns all "Cookie" header lines. *) Bugfix: a segmentation fault occurred if "client_body_in_file_only on" was used and nginx switched to a next upstream. *) Bugfix: on some condition while reconfiguration character codes inside the "charset_map" may be treated invalid; bug appeared in 0.3.50.
author Igor Sysoev <http://sysoev.ru>
date Fri, 28 Jul 2006 00:00:00 +0400
parents 003bd800ec2a
children 500a3242dff6
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
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
16 #define NGX_HTTP_SSI_MAX_PARAMS 16
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
17
158
2d15b82126ed nginx 0.3.26
Igor Sysoev <http://sysoev.ru>
parents: 146
diff changeset
18 #define NGX_HTTP_SSI_COMMAND_LEN 32
2d15b82126ed nginx 0.3.26
Igor Sysoev <http://sysoev.ru>
parents: 146
diff changeset
19 #define NGX_HTTP_SSI_PARAM_LEN 32
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
20 #define NGX_HTTP_SSI_PARAMS_N 4
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
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
23 #define NGX_HTTP_SSI_COND_IF 1
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
24 #define NGX_HTTP_SSI_COND_ELSE 2
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
25
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
26
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
28 ngx_hash_t hash;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
29 ngx_hash_keys_arrays_t commands;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
30 } ngx_http_ssi_main_conf_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
31
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
32
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
33 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34 ngx_buf_t *buf;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
35
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36 u_char *pos;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37 u_char *copy_start;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38 u_char *copy_end;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40 ngx_uint_t key;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
41 ngx_str_t command;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
42 ngx_array_t params;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
43 ngx_table_elt_t *param;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
44 ngx_table_elt_t params_array[NGX_HTTP_SSI_PARAMS_N];
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
45
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
46 ngx_chain_t *in;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
47 ngx_chain_t *out;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
48 ngx_chain_t **last_out;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
49 ngx_chain_t *busy;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
50 ngx_chain_t *free;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
51
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
52 ngx_uint_t state;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
53 ngx_uint_t saved_state;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
54 size_t saved;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
55 size_t looked;
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 size_t value_len;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
58
216
fa32d59d9a15 nginx 0.3.55
Igor Sysoev <http://sysoev.ru>
parents: 194
diff changeset
59 ngx_array_t *variables;
fa32d59d9a15 nginx 0.3.55
Igor Sysoev <http://sysoev.ru>
parents: 194
diff changeset
60 ngx_array_t *blocks;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
61
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
62 unsigned conditional:2;
216
fa32d59d9a15 nginx 0.3.55
Igor Sysoev <http://sysoev.ru>
parents: 194
diff changeset
63 unsigned block:1;
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
64 unsigned output:1;
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
65 unsigned output_chosen:1;
194
003bd800ec2a nginx 0.3.44
Igor Sysoev <http://sysoev.ru>
parents: 178
diff changeset
66 unsigned wait:1;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
67
158
2d15b82126ed nginx 0.3.26
Igor Sysoev <http://sysoev.ru>
parents: 146
diff changeset
68 void *value_buf;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
69 ngx_str_t timefmt;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
70 ngx_str_t errmsg;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
71 } ngx_http_ssi_ctx_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
72
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
73
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
74 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
75 ngx_http_ssi_ctx_t *ctx, ngx_str_t **);
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
76
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
77
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
78 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
79 ngx_str_t name;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
80 ngx_uint_t index;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
81
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
82 unsigned mandatory:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
83 unsigned multiple:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
84 } ngx_http_ssi_param_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
85
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
86
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
87 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
88 ngx_str_t name;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
89 ngx_http_ssi_command_pt handler;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
90 ngx_http_ssi_param_t *params;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
91
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
92 unsigned conditional:2;
216
fa32d59d9a15 nginx 0.3.55
Igor Sysoev <http://sysoev.ru>
parents: 194
diff changeset
93 unsigned block:1;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
94 unsigned flush:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
95 } ngx_http_ssi_command_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
96
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
97
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
98 extern ngx_module_t ngx_http_ssi_filter_module;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
99
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
100
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
101 #endif /* _NGX_HTTP_SSI_FILTER_H_INCLUDED_ */