annotate src/http/modules/ngx_http_ssi_filter_module.h @ 178:87699398f955 NGINX_0_3_36

nginx 0.3.36 *) Feature: the ngx_http_addition_filter_module. *) Feature: the "proxy_pass" and "fastcgi_pass" directives may be used inside the "if" block. *) Feature: the "proxy_ignore_client_abort" and "fastcgi_ignore_client_abort" directives. *) Feature: the "$request_completion" variable. *) Feature: the ngx_http_perl_module supports the $r->request_method and $r->remote_addr. *) Feature: the ngx_http_ssi_module supports the "elif" command. *) Bugfix: the "\/" string in the expression of the "if" command of the ngx_http_ssi_module was treated incorrectly. *) Bugfix: in the regular expressions in the "if" command of the ngx_http_ssi_module. *) Bugfix: if the relative path was specified in the "client_body_temp_path", "proxy_temp_path", "fastcgi_temp_path", and "perl_modules" directives, then the directory was used relatively to a current path but not to a server prefix.
author Igor Sysoev <http://sysoev.ru>
date Wed, 05 Apr 2006 00:00:00 +0400
parents 2d15b82126ed
children 003bd800ec2a
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
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
59 ngx_array_t variables;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
60
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
61 unsigned conditional:2;
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
62 unsigned output:1;
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
63 unsigned output_chosen:1;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
64
158
2d15b82126ed nginx 0.3.26
Igor Sysoev <http://sysoev.ru>
parents: 146
diff changeset
65 void *value_buf;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
66 ngx_str_t timefmt;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
67 ngx_str_t errmsg;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
68 } ngx_http_ssi_ctx_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
69
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
70
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
71 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
72 ngx_http_ssi_ctx_t *ctx, ngx_str_t **);
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
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
75 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
76 ngx_str_t name;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
77 ngx_uint_t index;
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 unsigned mandatory:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
80 unsigned multiple:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
81 } ngx_http_ssi_param_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_http_ssi_command_pt handler;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
87 ngx_http_ssi_param_t *params;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
88
178
87699398f955 nginx 0.3.36
Igor Sysoev <http://sysoev.ru>
parents: 158
diff changeset
89 unsigned conditional:2;
146
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
90 unsigned flush:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
91 } ngx_http_ssi_command_t;
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
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
94 extern ngx_module_t ngx_http_ssi_filter_module;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
95
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 #endif /* _NGX_HTTP_SSI_FILTER_H_INCLUDED_ */