annotate 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
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
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
18 #define NGX_HTTP_SSI_COMMAND_LEN 31
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
19 #define NGX_HTTP_SSI_PARAM_LEN 31
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
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
23 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
24 ngx_hash_t hash;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
25 ngx_hash_keys_arrays_t commands;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
26 } ngx_http_ssi_main_conf_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
28
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
29 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
30 ngx_buf_t *buf;
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 u_char *pos;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
33 u_char *copy_start;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
34 u_char *copy_end;
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 ngx_uint_t key;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37 ngx_str_t command;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38 ngx_array_t params;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39 ngx_table_elt_t *param;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
40 ngx_table_elt_t params_array[NGX_HTTP_SSI_PARAMS_N];
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
41
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
42 ngx_chain_t *in;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
43 ngx_chain_t *out;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
44 ngx_chain_t **last_out;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
45 ngx_chain_t *busy;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
46 ngx_chain_t *free;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
47
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
48 ngx_uint_t state;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
49 ngx_uint_t saved_state;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
50 size_t saved;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
51 size_t looked;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
52
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
53 size_t value_len;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
54
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
55 ngx_array_t variables;
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 output; /* unsigned output:1; */
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_str_t timefmt;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
60 ngx_str_t errmsg;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
61 } ngx_http_ssi_ctx_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
62
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
63
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
64 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
65 ngx_http_ssi_ctx_t *ctx, ngx_str_t **);
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
66
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
67
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
68 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
69 ngx_str_t name;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
70 ngx_uint_t index;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
71
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
72 unsigned mandatory:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
73 unsigned multiple:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
74 } ngx_http_ssi_param_t;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
75
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 typedef struct {
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
78 ngx_str_t name;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
79 ngx_http_ssi_command_pt handler;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
80 ngx_http_ssi_param_t *params;
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 conditional:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
83 unsigned flush:1;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
84 } ngx_http_ssi_command_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 extern ngx_module_t ngx_http_ssi_filter_module;
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
88
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
89
36af50a5582d nginx 0.3.20
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
90 #endif /* _NGX_HTTP_SSI_FILTER_H_INCLUDED_ */