annotate src/http/ngx_http_script.h @ 218:1bf60f8c5c9e NGINX_0_3_56

nginx 0.3.56 *) Feature: the "dav_access" directive. *) Feature: the "if" directive supports the "-d", "!-d", "-e", "!-e", "-x", and "!-x" operators. *) Bugfix: a segmentation fault occurred if an request returned an redirect and some sent to client header lines were logged in the access log.
author Igor Sysoev <http://sysoev.ru>
date Fri, 04 Aug 2006 00:00:00 +0400
parents 3689cd4e3228
children 10cc350ed8a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
1
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
2 /*
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
4 */
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
5
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
6
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
7 #ifndef _NGX_HTTP_SCRIPT_H_INCLUDED_
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #define _NGX_HTTP_SCRIPT_H_INCLUDED_
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
10
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
11 #include <ngx_config.h>
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_core.h>
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13 #include <ngx_http.h>
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
15
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
16 typedef struct {
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
17 u_char *ip;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
18 u_char *pos;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
19 ngx_http_variable_value_t *sp;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
20
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
21 ngx_str_t buf;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
22 ngx_str_t line;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
23
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
24 /* the start of the rewritten arguments */
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
25 u_char *args;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
26
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
27 unsigned flushed:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
28 unsigned skip:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
29 unsigned quote:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
30 unsigned log:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
31
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
32 int *captures;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
33 ngx_uint_t ncaptures;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
34
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
35 ngx_int_t status;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
36 ngx_http_request_t *request;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37 } ngx_http_script_engine_t;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
39
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
40 typedef struct {
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
41 ngx_conf_t *cf;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
42 ngx_str_t *source;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
43
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
44 ngx_array_t **flushes;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
45 ngx_array_t **lengths;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
46 ngx_array_t **values;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
47
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
48 ngx_uint_t variables;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
49 ngx_uint_t ncaptures;
190
3689cd4e3228 nginx 0.3.42
Igor Sysoev <http://sysoev.ru>
parents: 186
diff changeset
50 ngx_uint_t captures_mask;
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
51 ngx_uint_t size;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
52
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
53 void *main;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
54
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
55 unsigned compile_args:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
56 unsigned complete_lengths:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
57 unsigned complete_values:1;
190
3689cd4e3228 nginx 0.3.42
Igor Sysoev <http://sysoev.ru>
parents: 186
diff changeset
58 unsigned dup_capture:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
59
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
60 unsigned args:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
61 } ngx_http_script_compile_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
62
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
63
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
64 typedef void (*ngx_http_script_code_pt) (ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
65 typedef size_t (*ngx_http_script_len_code_pt) (ngx_http_script_engine_t *e);
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
66
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
67
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
68 typedef struct {
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
69 ngx_http_script_code_pt code;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
70 uintptr_t len;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
71 } ngx_http_script_copy_code_t;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
72
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
73
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
74 typedef struct {
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
75 ngx_http_script_code_pt code;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
76 uintptr_t index;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
77 } ngx_http_script_var_code_t;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
78
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
79
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
80 typedef struct {
186
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
81 ngx_http_script_code_pt code;
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
82 ngx_http_set_variable_pt handler;
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
83 uintptr_t data;
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
84 } ngx_http_script_var_handler_code_t;
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
85
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
86
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
87 typedef struct {
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
88 ngx_http_script_code_pt code;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
89 uintptr_t n;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
90 } ngx_http_script_copy_capture_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
91
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
92
66
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
93 #if (NGX_PCRE)
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
94
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
95 typedef struct {
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
96 ngx_http_script_code_pt code;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
97 ngx_regex_t *regex;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
98 ngx_array_t *lengths;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
99 uintptr_t size;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
100 uintptr_t ncaptures;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
101 uintptr_t status;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
102 uintptr_t next;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
103
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
104 uintptr_t test:1;
180
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
105 uintptr_t negative_test:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
106 uintptr_t uri:1;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
107 uintptr_t args:1;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
108
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
109 /* add the r->args to the new arguments */
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
110 uintptr_t add_args:1;
126
df17fbafec8f nginx 0.3.10
Igor Sysoev <http://sysoev.ru>
parents: 122
diff changeset
111
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
112 uintptr_t redirect:1;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
113 uintptr_t break_cycle:1;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
114
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
115 ngx_str_t name;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
116 } ngx_http_script_regex_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
117
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
118
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
119 typedef struct {
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
120 ngx_http_script_code_pt code;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
121
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
122 uintptr_t uri:1;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
123 uintptr_t args:1;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
124
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
125 /* add the r->args to the new arguments */
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
126 uintptr_t add_args:1;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
127
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
128 uintptr_t redirect:1;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
129 } ngx_http_script_regex_end_code_t;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
130
66
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
131 #endif
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
132
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
133
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
134 typedef struct {
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
135 ngx_http_script_code_pt code;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
136 uintptr_t status;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
137 uintptr_t null;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
138 } ngx_http_script_return_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
139
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
140
180
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
141 typedef enum {
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
142 ngx_http_script_file_plain = 0,
218
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
143 ngx_http_script_file_not_plain,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
144 ngx_http_script_file_dir,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
145 ngx_http_script_file_not_dir,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
146 ngx_http_script_file_exists,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
147 ngx_http_script_file_not_exists,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
148 ngx_http_script_file_exec,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
149 ngx_http_script_file_not_exec
180
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
150 } ngx_http_script_file_op_e;
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
151
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
152
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
153 typedef struct {
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
154 ngx_http_script_code_pt code;
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
155 uintptr_t op;
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
156 } ngx_http_script_file_code_t;
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
157
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
158
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
159 typedef struct {
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
160 ngx_http_script_code_pt code;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
161 uintptr_t next;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
162 void **loc_conf;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
163 } ngx_http_script_if_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
164
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
165
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
166 typedef struct {
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
167 ngx_http_script_code_pt code;
64
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
168 ngx_array_t *lengths;
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
169 } ngx_http_script_complex_value_code_t;
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
170
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
171
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
172 typedef struct {
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
173 ngx_http_script_code_pt code;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
174 uintptr_t value;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
175 uintptr_t text_len;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
176 uintptr_t text_data;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
177 } ngx_http_script_value_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
178
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
179
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
180 ngx_uint_t ngx_http_script_variables_count(ngx_str_t *value);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
181 ngx_int_t ngx_http_script_compile(ngx_http_script_compile_t *sc);
172
1b490fc19afa nginx 0.3.33
Igor Sysoev <http://sysoev.ru>
parents: 126
diff changeset
182 u_char *ngx_http_script_run(ngx_http_request_t *r, ngx_str_t *value,
1b490fc19afa nginx 0.3.33
Igor Sysoev <http://sysoev.ru>
parents: 126
diff changeset
183 void *code_lengths, size_t reserved, void *code_values);
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
184 void ngx_http_script_flush_no_cachable_variables(ngx_http_request_t *r,
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
185 ngx_array_t *indices);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
186
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
187 void *ngx_http_script_start_code(ngx_pool_t *pool, ngx_array_t **codes,
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
188 size_t size);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
189 void *ngx_http_script_add_code(ngx_array_t *codes, size_t size, void *code);
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
190
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
191 size_t ngx_http_script_copy_len_code(ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
192 void ngx_http_script_copy_code(ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
193 size_t ngx_http_script_copy_var_len_code(ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
194 void ngx_http_script_copy_var_code(ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
195 size_t ngx_http_script_copy_capture_len_code(ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
196 void ngx_http_script_copy_capture_code(ngx_http_script_engine_t *e);
66
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
197 void ngx_http_script_start_args_code(ngx_http_script_engine_t *e);
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
198 #if (NGX_PCRE)
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
199 void ngx_http_script_regex_start_code(ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
200 void ngx_http_script_regex_end_code(ngx_http_script_engine_t *e);
66
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
201 #endif
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
202 void ngx_http_script_return_code(ngx_http_script_engine_t *e);
76
da9a3b14312d nginx 0.1.38
Igor Sysoev <http://sysoev.ru>
parents: 66
diff changeset
203 void ngx_http_script_break_code(ngx_http_script_engine_t *e);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
204 void ngx_http_script_if_code(ngx_http_script_engine_t *e);
126
df17fbafec8f nginx 0.3.10
Igor Sysoev <http://sysoev.ru>
parents: 122
diff changeset
205 void ngx_http_script_equal_code(ngx_http_script_engine_t *e);
df17fbafec8f nginx 0.3.10
Igor Sysoev <http://sysoev.ru>
parents: 122
diff changeset
206 void ngx_http_script_not_equal_code(ngx_http_script_engine_t *e);
180
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
207 void ngx_http_script_file_code(ngx_http_script_engine_t *e);
64
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
208 void ngx_http_script_complex_value_code(ngx_http_script_engine_t *e);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
209 void ngx_http_script_value_code(ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
210 void ngx_http_script_set_var_code(ngx_http_script_engine_t *e);
186
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
211 void ngx_http_script_var_set_handler_code(ngx_http_script_engine_t *e);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
212 void ngx_http_script_var_code(ngx_http_script_engine_t *e);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
213 void ngx_http_script_nop_code(ngx_http_script_engine_t *e);
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
214
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
215
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
216 #endif /* _NGX_HTTP_SCRIPT_H_INCLUDED_ */