annotate src/http/ngx_http_script.h @ 660:d0f7a625f27c NGINX_1_1_14

nginx 1.1.14 *) Feature: multiple "limit_req" limits may be used simultaneously. *) Bugfix: in error handling while connecting to a backend. Thanks to Piotr Sikora. *) Bugfix: in AIO error handling on FreeBSD. *) Bugfix: in the OpenSSL library initialization. *) Bugfix: the "proxy_redirect" directives might not be correctly inherited. *) Bugfix: memory leak during reconfiguration if the "pcre_jit" directive was used.
author Igor Sysoev <http://sysoev.ru>
date Mon, 30 Jan 2012 00:00:00 +0400
parents be70f83b184f
children
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
660
d0f7a625f27c nginx 1.1.14
Igor Sysoev <http://sysoev.ru>
parents: 598
diff changeset
4 * Copyright (C) Nginx, Inc.
56
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
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
8 #ifndef _NGX_HTTP_SCRIPT_H_INCLUDED_
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
9 #define _NGX_HTTP_SCRIPT_H_INCLUDED_
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
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
12 #include <ngx_config.h>
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
13 #include <ngx_core.h>
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
14 #include <ngx_http.h>
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
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
17 typedef struct {
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
18 u_char *ip;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
19 u_char *pos;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
20 ngx_http_variable_value_t *sp;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
21
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
22 ngx_str_t buf;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
23 ngx_str_t line;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
24
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
25 /* the start of the rewritten arguments */
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
26 u_char *args;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
27
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
28 unsigned flushed:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
29 unsigned skip:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
30 unsigned quote:1;
366
babd3d9efb62 nginx 0.6.27
Igor Sysoev <http://sysoev.ru>
parents: 340
diff changeset
31 unsigned is_args:1;
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
32 unsigned log:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
33
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
34 ngx_int_t status;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
35 ngx_http_request_t *request;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
36 } ngx_http_script_engine_t;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
37
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
38
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
39 typedef struct {
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
40 ngx_conf_t *cf;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
41 ngx_str_t *source;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
42
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
43 ngx_array_t **flushes;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
44 ngx_array_t **lengths;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
45 ngx_array_t **values;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
46
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
47 ngx_uint_t variables;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
48 ngx_uint_t ncaptures;
190
3689cd4e3228 nginx 0.3.42
Igor Sysoev <http://sysoev.ru>
parents: 186
diff changeset
49 ngx_uint_t captures_mask;
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
50 ngx_uint_t size;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
51
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
52 void *main;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
53
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
54 unsigned compile_args:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
55 unsigned complete_lengths:1;
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
56 unsigned complete_values:1;
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
57 unsigned zero:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
58 unsigned conf_prefix:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
59 unsigned root_prefix:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
60
190
3689cd4e3228 nginx 0.3.42
Igor Sysoev <http://sysoev.ru>
parents: 186
diff changeset
61 unsigned dup_capture:1;
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
62 unsigned args:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
63 } ngx_http_script_compile_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
64
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
65
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
66 typedef struct {
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
67 ngx_str_t value;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
68 ngx_uint_t *flushes;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
69 void *lengths;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
70 void *values;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
71 } ngx_http_complex_value_t;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
72
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
73
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
74 typedef struct {
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
75 ngx_conf_t *cf;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
76 ngx_str_t *value;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
77 ngx_http_complex_value_t *complex_value;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
78
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
79 unsigned zero:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
80 unsigned conf_prefix:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
81 unsigned root_prefix:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
82 } ngx_http_compile_complex_value_t;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
83
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
84
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
85 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
86 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
87
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
88
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
89 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
90 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
91 uintptr_t len;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
92 } ngx_http_script_copy_code_t;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
93
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
94
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
95 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
96 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
97 uintptr_t index;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
98 } ngx_http_script_var_code_t;
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
99
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
100
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
101 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
102 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
103 ngx_http_set_variable_pt handler;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
104 uintptr_t data;
186
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
105 } ngx_http_script_var_handler_code_t;
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
106
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
107
54aabf2b0bc6 nginx 0.3.40
Igor Sysoev <http://sysoev.ru>
parents: 180
diff changeset
108 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
109 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
110 uintptr_t n;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
111 } ngx_http_script_copy_capture_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
112
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
113
66
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
114 #if (NGX_PCRE)
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
115
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
116 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
117 ngx_http_script_code_pt code;
546
e19e5f542878 nginx 0.8.25
Igor Sysoev <http://sysoev.ru>
parents: 482
diff changeset
118 ngx_http_regex_t *regex;
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
119 ngx_array_t *lengths;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
120 uintptr_t size;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
121 uintptr_t status;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
122 uintptr_t next;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
123
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
124 uintptr_t test:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
125 uintptr_t negative_test:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
126 uintptr_t uri:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
127 uintptr_t args:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
128
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
129 /* add the r->args to the new arguments */
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
130 uintptr_t add_args:1;
126
df17fbafec8f nginx 0.3.10
Igor Sysoev <http://sysoev.ru>
parents: 122
diff changeset
131
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
132 uintptr_t redirect:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
133 uintptr_t break_cycle:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
134
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
135 ngx_str_t name;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
136 } ngx_http_script_regex_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
137
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
138
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
139 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
140 ngx_http_script_code_pt code;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
141
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
142 uintptr_t uri:1;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
143 uintptr_t args:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
144
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
145 /* add the r->args to the new arguments */
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
146 uintptr_t add_args:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
147
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
148 uintptr_t redirect:1;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
149 } ngx_http_script_regex_end_code_t;
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
150
66
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
151 #endif
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
152
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
153
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
154 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
155 ngx_http_script_code_pt code;
482
392c16f2d858 nginx 0.7.53
Igor Sysoev <http://sysoev.ru>
parents: 468
diff changeset
156 uintptr_t conf_prefix;
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
157 } ngx_http_script_full_name_code_t;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
158
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
159
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
160 typedef struct {
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
161 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
162 uintptr_t status;
580
4d3e880ce86c nginx 0.8.42
Igor Sysoev <http://sysoev.ru>
parents: 546
diff changeset
163 ngx_http_complex_value_t text;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
164 } ngx_http_script_return_code_t;
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
180
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
167 typedef enum {
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
168 ngx_http_script_file_plain = 0,
218
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
169 ngx_http_script_file_not_plain,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
170 ngx_http_script_file_dir,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
171 ngx_http_script_file_not_dir,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
172 ngx_http_script_file_exists,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
173 ngx_http_script_file_not_exists,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
174 ngx_http_script_file_exec,
1bf60f8c5c9e nginx 0.3.56
Igor Sysoev <http://sysoev.ru>
parents: 190
diff changeset
175 ngx_http_script_file_not_exec
180
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
176 } ngx_http_script_file_op_e;
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
177
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
178
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
179 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
180 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
181 uintptr_t op;
180
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
182 } ngx_http_script_file_code_t;
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
183
4cd3e70c4d60 nginx 0.3.37
Igor Sysoev <http://sysoev.ru>
parents: 172
diff changeset
184
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
185 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
186 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
187 uintptr_t next;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
188 void **loc_conf;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
189 } ngx_http_script_if_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
190
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
191
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
192 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
193 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
194 ngx_array_t *lengths;
64
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
195 } ngx_http_script_complex_value_code_t;
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
196
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
197
5db440287648 nginx 0.1.32
Igor Sysoev <http://sysoev.ru>
parents: 58
diff changeset
198 typedef struct {
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
199 ngx_http_script_code_pt code;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
200 uintptr_t value;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
201 uintptr_t text_len;
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
202 uintptr_t text_data;
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
203 } ngx_http_script_value_code_t;
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
204
56
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
205
468
56baf312c1b5 nginx 0.7.46
Igor Sysoev <http://sysoev.ru>
parents: 464
diff changeset
206 void ngx_http_script_flush_complex_value(ngx_http_request_t *r,
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
207 ngx_http_complex_value_t *val);
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
208 ngx_int_t ngx_http_complex_value(ngx_http_request_t *r,
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
209 ngx_http_complex_value_t *val, ngx_str_t *value);
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
210 ngx_int_t ngx_http_compile_complex_value(ngx_http_compile_complex_value_t *ccv);
598
be70f83b184f nginx 0.8.51
Igor Sysoev <http://sysoev.ru>
parents: 596
diff changeset
211 char *ngx_http_set_complex_value_slot(ngx_conf_t *cf, ngx_command_t *cmd,
596
6c96fdd2dfc3 nginx 0.8.50
Igor Sysoev <http://sysoev.ru>
parents: 588
diff changeset
212 void *conf);
6c96fdd2dfc3 nginx 0.8.50
Igor Sysoev <http://sysoev.ru>
parents: 588
diff changeset
213
464
c8cfb6c462ef nginx 0.7.44
Igor Sysoev <http://sysoev.ru>
parents: 456
diff changeset
214
588
b6a5942a4e6a nginx 0.8.46
Igor Sysoev <http://sysoev.ru>
parents: 580
diff changeset
215 ngx_int_t ngx_http_test_predicates(ngx_http_request_t *r,
b6a5942a4e6a nginx 0.8.46
Igor Sysoev <http://sysoev.ru>
parents: 580
diff changeset
216 ngx_array_t *predicates);
b6a5942a4e6a nginx 0.8.46
Igor Sysoev <http://sysoev.ru>
parents: 580
diff changeset
217 char *ngx_http_set_predicate_slot(ngx_conf_t *cf, ngx_command_t *cmd,
b6a5942a4e6a nginx 0.8.46
Igor Sysoev <http://sysoev.ru>
parents: 580
diff changeset
218 void *conf);
b6a5942a4e6a nginx 0.8.46
Igor Sysoev <http://sysoev.ru>
parents: 580
diff changeset
219
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
220 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
221 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
222 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
223 void *code_lengths, size_t reserved, void *code_values);
340
10cc350ed8a1 nginx 0.6.14
Igor Sysoev <http://sysoev.ru>
parents: 218
diff changeset
224 void ngx_http_script_flush_no_cacheable_variables(ngx_http_request_t *r,
122
d25a1d6034f1 nginx 0.3.8
Igor Sysoev <http://sysoev.ru>
parents: 76
diff changeset
225 ngx_array_t *indices);
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
226
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
227 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
228 size_t size);
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
229 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
230
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
231 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
232 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
233 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
234 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
235 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
236 void ngx_http_script_copy_capture_code(ngx_http_script_engine_t *e);
366
babd3d9efb62 nginx 0.6.27
Igor Sysoev <http://sysoev.ru>
parents: 340
diff changeset
237 size_t ngx_http_script_mark_args_code(ngx_http_script_engine_t *e);
66
818201e5a553 nginx 0.1.33
Igor Sysoev <http://sysoev.ru>
parents: 64
diff changeset
238 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
239 #if (NGX_PCRE)
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
240 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
241 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
242 #endif
58
b55cbf18157e nginx 0.1.29
Igor Sysoev <http://sysoev.ru>
parents: 56
diff changeset
243 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
244 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
245 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
246 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
247 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
248 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
249 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
250 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
251 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
252 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
253 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
254 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
255
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
256
3050baa54a26 nginx 0.1.28
Igor Sysoev <http://sysoev.ru>
parents:
diff changeset
257 #endif /* _NGX_HTTP_SCRIPT_H_INCLUDED_ */