Mercurial > hg > nginx-quic
annotate src/http/ngx_http_core_module.h @ 2462:90d5ddfedbb1
use GetFileAttributesEx() instead of GetFileAttributes()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 21 Jan 2009 15:56:29 +0000 |
parents | 43dcf8cc2cb1 |
children | 9081bbdccda1 |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
437
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
437
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
437
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
437
diff
changeset
|
5 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
437
diff
changeset
|
6 |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 #ifndef _NGX_HTTP_CORE_H_INCLUDED_ |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #define _NGX_HTTP_CORE_H_INCLUDED_ |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
2233 | 11 #include <ngx_config.h> |
12 #include <ngx_core.h> | |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 #include <ngx_http.h> |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 |
1790
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
16 #define NGX_HTTP_GZIP_PROXIED_OFF 0x0002 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
17 #define NGX_HTTP_GZIP_PROXIED_EXPIRED 0x0004 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
18 #define NGX_HTTP_GZIP_PROXIED_NO_CACHE 0x0008 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
19 #define NGX_HTTP_GZIP_PROXIED_NO_STORE 0x0010 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
20 #define NGX_HTTP_GZIP_PROXIED_PRIVATE 0x0020 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
21 #define NGX_HTTP_GZIP_PROXIED_NO_LM 0x0040 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
22 #define NGX_HTTP_GZIP_PROXIED_NO_ETAG 0x0080 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
23 #define NGX_HTTP_GZIP_PROXIED_AUTH 0x0100 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
24 #define NGX_HTTP_GZIP_PROXIED_ANY 0x0200 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
25 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
26 |
1806 | 27 #define NGX_HTTP_SATISFY_ALL 0 |
28 #define NGX_HTTP_SATISFY_ANY 1 | |
29 | |
30 | |
2027 | 31 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; |
32 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; | |
33 | |
34 | |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
35 typedef struct { |
523 | 36 unsigned default_server:1; |
37 unsigned bind:1; | |
2224 | 38 #if (NGX_HTTP_SSL) |
39 unsigned ssl:1; | |
40 #endif | |
523 | 41 |
42 int backlog; | |
563 | 43 int rcvbuf; |
44 int sndbuf; | |
523 | 45 |
46 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) | |
47 char *accept_filter; | |
48 #endif | |
49 #if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT) | |
50 ngx_uint_t deferred_accept; | |
51 #endif | |
52 | |
2197
74477ea8074f
*) remove zero termination in ngx_inet_ntop() and ngx_sock_ntop()
Igor Sysoev <igor@sysoev.ru>
parents:
2138
diff
changeset
|
53 u_char addr[NGX_INET_ADDRSTRLEN + sizeof(":65535")]; |
631 | 54 |
523 | 55 } ngx_http_listen_conf_t; |
56 | |
57 | |
58 typedef struct { | |
477 | 59 in_addr_t addr; |
60 in_port_t port; | |
61 int family; | |
523 | 62 |
1489
56f1ea5baabb
u_char* is enough to keep file name
Igor Sysoev <igor@sysoev.ru>
parents:
1457
diff
changeset
|
63 u_char *file_name; |
56f1ea5baabb
u_char* is enough to keep file name
Igor Sysoev <igor@sysoev.ru>
parents:
1457
diff
changeset
|
64 ngx_uint_t line; |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
65 |
523 | 66 ngx_http_listen_conf_t conf; |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
67 } ngx_http_listen_t; |
19
d7908993fdeb
nginx-0.0.1-2002-12-02-19:09:40 import; resume after 2 months stall
Igor Sysoev <igor@sysoev.ru>
parents:
13
diff
changeset
|
68 |
41
59e7c7f30d49
nginx-0.0.1-2002-12-26-19:26:23 import
Igor Sysoev <igor@sysoev.ru>
parents:
19
diff
changeset
|
69 |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
70 typedef enum { |
573 | 71 NGX_HTTP_POST_READ_PHASE = 0, |
368
15c84a40e87d
nginx-0.0.7-2004-06-24-20:07:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
362
diff
changeset
|
72 |
573 | 73 NGX_HTTP_SERVER_REWRITE_PHASE, |
681 | 74 |
573 | 75 NGX_HTTP_FIND_CONFIG_PHASE, |
489 | 76 NGX_HTTP_REWRITE_PHASE, |
681 | 77 NGX_HTTP_POST_REWRITE_PHASE, |
368
15c84a40e87d
nginx-0.0.7-2004-06-24-20:07:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
362
diff
changeset
|
78 |
581 | 79 NGX_HTTP_PREACCESS_PHASE, |
80 | |
368
15c84a40e87d
nginx-0.0.7-2004-06-24-20:07:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
362
diff
changeset
|
81 NGX_HTTP_ACCESS_PHASE, |
681 | 82 NGX_HTTP_POST_ACCESS_PHASE, |
83 | |
2407 | 84 NGX_HTTP_TRY_FILES_PHASE, |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
85 NGX_HTTP_CONTENT_PHASE, |
368
15c84a40e87d
nginx-0.0.7-2004-06-24-20:07:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
362
diff
changeset
|
86 |
581 | 87 NGX_HTTP_LOG_PHASE |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
88 } ngx_http_phases; |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
89 |
681 | 90 typedef struct ngx_http_phase_handler_s ngx_http_phase_handler_t; |
91 | |
92 typedef ngx_int_t (*ngx_http_phase_handler_pt)(ngx_http_request_t *r, | |
93 ngx_http_phase_handler_t *ph); | |
94 | |
95 struct ngx_http_phase_handler_s { | |
96 ngx_http_phase_handler_pt checker; | |
97 ngx_http_handler_pt handler; | |
98 ngx_uint_t next; | |
99 }; | |
100 | |
101 | |
102 typedef struct { | |
103 ngx_http_phase_handler_t *handlers; | |
104 ngx_uint_t server_rewrite_index; | |
1353 | 105 ngx_uint_t location_rewrite_index; |
681 | 106 } ngx_http_phase_engine_t; |
107 | |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
108 |
19
d7908993fdeb
nginx-0.0.1-2002-12-02-19:09:40 import; resume after 2 months stall
Igor Sysoev <igor@sysoev.ru>
parents:
13
diff
changeset
|
109 typedef struct { |
477 | 110 ngx_array_t handlers; |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
114
diff
changeset
|
111 } ngx_http_phase_t; |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
114
diff
changeset
|
112 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
114
diff
changeset
|
113 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
114
diff
changeset
|
114 typedef struct { |
485 | 115 ngx_array_t servers; /* ngx_http_core_srv_conf_t */ |
477 | 116 |
681 | 117 ngx_http_phase_engine_t phase_engine; |
143
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
114
diff
changeset
|
118 |
649 | 119 ngx_hash_t headers_in_hash; |
611 | 120 |
121 ngx_hash_t variables_hash; | |
122 | |
123 ngx_array_t variables; /* ngx_http_variable_t */ | |
507 | 124 |
593 | 125 ngx_uint_t server_names_hash_max_size; |
126 ngx_uint_t server_names_hash_bucket_size; | |
485 | 127 |
611 | 128 ngx_uint_t variables_hash_max_size; |
129 ngx_uint_t variables_hash_bucket_size; | |
130 | |
131 ngx_hash_keys_arrays_t *variables_keys; | |
681 | 132 |
2407 | 133 ngx_uint_t try_files; /* unsigned try_files:1 */ |
134 | |
681 | 135 ngx_http_phase_t phases[NGX_HTTP_LOG_PHASE + 1]; |
90
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
89
diff
changeset
|
136 } ngx_http_core_main_conf_t; |
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
89
diff
changeset
|
137 |
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
89
diff
changeset
|
138 |
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
89
diff
changeset
|
139 typedef struct { |
485 | 140 /* array of the ngx_http_listen_t, "listen" directive */ |
2027 | 141 ngx_array_t listen; |
95
b48066122884
nginx-0.0.1-2003-05-23-15:53:01 import
Igor Sysoev <igor@sysoev.ru>
parents:
93
diff
changeset
|
142 |
485 | 143 /* array of the ngx_http_server_name_t, "server_name" directive */ |
2027 | 144 ngx_array_t server_names; |
393
5659d773cfa8
nginx-0.0.7-2004-07-15-20:35:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
145 |
5659d773cfa8
nginx-0.0.7-2004-07-15-20:35:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
146 /* server ctx */ |
2027 | 147 ngx_http_conf_ctx_t *ctx; |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
148 |
2027 | 149 ngx_str_t server_name; |
593 | 150 |
2027 | 151 size_t connection_pool_size; |
152 size_t request_pool_size; | |
153 size_t client_header_buffer_size; | |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
154 |
2027 | 155 ngx_bufs_t large_client_header_buffers; |
435
5cdc4838d4e8
nginx-0.0.11-2004-09-22-20:18:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
429
diff
changeset
|
156 |
2027 | 157 ngx_msec_t client_header_timeout; |
335
d4241d7787fe
nginx-0.0.3-2004-05-14-20:51:47 import
Igor Sysoev <igor@sysoev.ru>
parents:
326
diff
changeset
|
158 |
2027 | 159 ngx_flag_t ignore_invalid_headers; |
160 ngx_flag_t merge_slashes; | |
2256 | 161 ngx_flag_t underscores_in_headers; |
2027 | 162 |
163 ngx_http_core_loc_conf_t **named_locations; | |
19
d7908993fdeb
nginx-0.0.1-2002-12-02-19:09:40 import; resume after 2 months stall
Igor Sysoev <igor@sysoev.ru>
parents:
13
diff
changeset
|
164 } ngx_http_core_srv_conf_t; |
d7908993fdeb
nginx-0.0.1-2002-12-02-19:09:40 import; resume after 2 months stall
Igor Sysoev <igor@sysoev.ru>
parents:
13
diff
changeset
|
165 |
41
59e7c7f30d49
nginx-0.0.1-2002-12-26-19:26:23 import
Igor Sysoev <igor@sysoev.ru>
parents:
19
diff
changeset
|
166 |
55
cad6c2f43283
nginx-0.0.1-2003-01-29-10:25:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
167 /* list of structures to find core_srv_conf quickly at run time */ |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
168 |
593 | 169 |
170 typedef struct { | |
171 in_addr_t addr; | |
1387 | 172 |
593 | 173 /* the default server configuration for this address:port */ |
174 ngx_http_core_srv_conf_t *core_srv_conf; | |
1387 | 175 |
593 | 176 ngx_http_virtual_names_t *virtual_names; |
2224 | 177 |
178 #if (NGX_HTTP_SSL) | |
179 ngx_uint_t ssl; /* unsigned ssl:1; */ | |
180 #endif | |
593 | 181 } ngx_http_in_addr_t; |
182 | |
183 | |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
184 typedef struct { |
477 | 185 in_port_t port; |
186 ngx_str_t port_text; | |
593 | 187 ngx_http_in_addr_t *addrs; |
188 ngx_uint_t naddrs; | |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
189 } ngx_http_in_port_t; |
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
190 |
89
29bf798b583f
nginx-0.0.1-2003-05-15-19:42:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
88
diff
changeset
|
191 |
593 | 192 typedef struct { |
193 in_port_t port; | |
194 ngx_array_t addrs; /* array of ngx_http_conf_in_addr_t */ | |
195 } ngx_http_conf_in_port_t; | |
196 | |
197 | |
198 typedef struct { | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
190
diff
changeset
|
199 in_addr_t addr; |
477 | 200 |
593 | 201 ngx_hash_t hash; |
1253
8ef04207c84f
the "www.example.*" wildcard hash support
Igor Sysoev <igor@sysoev.ru>
parents:
1236
diff
changeset
|
202 ngx_hash_wildcard_t *wc_head; |
8ef04207c84f
the "www.example.*" wildcard hash support
Igor Sysoev <igor@sysoev.ru>
parents:
1236
diff
changeset
|
203 ngx_hash_wildcard_t *wc_tail; |
593 | 204 |
205 ngx_array_t names; /* array of ngx_http_server_name_t */ | |
477 | 206 |
1387 | 207 #if (NGX_PCRE) |
208 ngx_uint_t nregex; | |
209 ngx_http_server_name_t *regex; | |
210 #endif | |
211 | |
477 | 212 /* the default server configuration for this address:port */ |
213 ngx_http_core_srv_conf_t *core_srv_conf; | |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
214 |
593 | 215 unsigned default_server:1; |
216 unsigned bind:1; | |
2224 | 217 #if (NGX_HTTP_SSL) |
218 unsigned ssl:1; | |
219 #endif | |
593 | 220 |
221 ngx_http_listen_conf_t *listen_conf; | |
222 } ngx_http_conf_in_addr_t; | |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
223 |
89
29bf798b583f
nginx-0.0.1-2003-05-15-19:42:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
88
diff
changeset
|
224 |
1387 | 225 struct ngx_http_server_name_s { |
226 #if (NGX_PCRE) | |
227 ngx_regex_t *regex; | |
228 #endif | |
229 ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */ | |
55
cad6c2f43283
nginx-0.0.1-2003-01-29-10:25:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
230 ngx_str_t name; |
1387 | 231 }; |
55
cad6c2f43283
nginx-0.0.1-2003-01-29-10:25:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
232 |
cad6c2f43283
nginx-0.0.1-2003-01-29-10:25:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
233 |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
234 typedef struct { |
673 | 235 ngx_int_t status; |
236 ngx_int_t overwrite; | |
237 ngx_str_t uri; | |
1982
dd388c80f5a2
args support in static error_page
Igor Sysoev <igor@sysoev.ru>
parents:
1806
diff
changeset
|
238 ngx_str_t args; |
673 | 239 ngx_array_t *uri_lengths; |
240 ngx_array_t *uri_values; | |
176
c0552e5ab567
nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents:
162
diff
changeset
|
241 } ngx_http_err_page_t; |
c0552e5ab567
nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents:
162
diff
changeset
|
242 |
c0552e5ab567
nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents:
162
diff
changeset
|
243 |
2407 | 244 typedef struct { |
245 ngx_array_t *lengths; | |
246 ngx_array_t *values; | |
247 ngx_str_t name; | |
2458
43dcf8cc2cb1
allow directories in try_files
Igor Sysoev <igor@sysoev.ru>
parents:
2407
diff
changeset
|
248 ngx_uint_t test_dir; /* unsigned test_dir:1; */ |
2407 | 249 } ngx_http_try_file_t; |
250 | |
251 | |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
252 struct ngx_http_core_loc_conf_s { |
96
a23d010f356d
nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
95
diff
changeset
|
253 ngx_str_t name; /* location name */ |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
254 |
455 | 255 #if (NGX_PCRE) |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
256 ngx_regex_t *regex; |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
257 #endif |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
258 |
1353 | 259 unsigned noname:1; /* "if () {}" block or limit_except */ |
260 unsigned named:1; | |
485 | 261 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
262 unsigned exact_match:1; |
467 | 263 unsigned noregex:1; |
264 | |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
265 unsigned auto_redirect:1; |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
266 unsigned alias:1; |
2205 | 267 #if (NGX_HTTP_GZIP) |
268 unsigned gzip_disable_msie6:2; | |
269 #endif | |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
270 |
2027 | 271 ngx_http_location_tree_node_t *static_locations; |
272 ngx_http_core_loc_conf_t **regex_locations; | |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
273 |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
274 /* pointer to the modules' loc_conf */ |
2024 | 275 void **loc_conf; |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
276 |
631 | 277 uint32_t limit_except; |
2024 | 278 void **limit_except_loc_conf; |
631 | 279 |
356
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
280 ngx_http_handler_pt handler; |
71
59229033ae93
nginx-0.0.1-2003-04-08-19:40:10 import
Igor Sysoev <igor@sysoev.ru>
parents:
69
diff
changeset
|
281 |
577 | 282 ngx_str_t root; /* root, alias */ |
283 ngx_str_t post_action; | |
284 | |
595 | 285 ngx_array_t *root_lengths; |
286 ngx_array_t *root_values; | |
287 | |
589 | 288 ngx_array_t *types; |
289 ngx_hash_t types_hash; | |
290 ngx_str_t default_type; | |
291 | |
663 | 292 off_t client_max_body_size; /* client_max_body_size */ |
2129 | 293 off_t directio; /* directio */ |
663 | 294 |
303
00c5660d2707
nginx-0.0.3-2004-04-01-20:20:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
293
diff
changeset
|
295 size_t client_body_buffer_size; /* client_body_buffer_size */ |
362
7650aea1816f
nginx-0.0.7-2004-06-21-19:59:32 import
Igor Sysoev <igor@sysoev.ru>
parents:
356
diff
changeset
|
296 size_t send_lowat; /* send_lowat */ |
391
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
369
diff
changeset
|
297 size_t postpone_output; /* postpone_output */ |
b670db10cbbd
nginx-0.0.7-2004-07-14-20:01:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
369
diff
changeset
|
298 size_t limit_rate; /* limit_rate */ |
1197 | 299 size_t sendfile_max_chunk; /* sendfile_max_chunk */ |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
300 |
162
96993d4d5067
nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
158
diff
changeset
|
301 ngx_msec_t client_body_timeout; /* client_body_timeout */ |
96
a23d010f356d
nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
95
diff
changeset
|
302 ngx_msec_t send_timeout; /* send_timeout */ |
a23d010f356d
nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
95
diff
changeset
|
303 ngx_msec_t keepalive_timeout; /* keepalive_timeout */ |
a23d010f356d
nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
95
diff
changeset
|
304 ngx_msec_t lingering_time; /* lingering_time */ |
a23d010f356d
nginx-0.0.1-2003-05-27-16:18:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
95
diff
changeset
|
305 ngx_msec_t lingering_timeout; /* lingering_timeout */ |
1652
cc7a7d0b89e8
http resolver and resolver_timeout
Igor Sysoev <igor@sysoev.ru>
parents:
1592
diff
changeset
|
306 ngx_msec_t resolver_timeout; /* resolver_timeout */ |
cc7a7d0b89e8
http resolver and resolver_timeout
Igor Sysoev <igor@sysoev.ru>
parents:
1592
diff
changeset
|
307 |
cc7a7d0b89e8
http resolver and resolver_timeout
Igor Sysoev <igor@sysoev.ru>
parents:
1592
diff
changeset
|
308 ngx_resolver_t *resolver; /* resolver */ |
71
59229033ae93
nginx-0.0.1-2003-04-08-19:40:10 import
Igor Sysoev <igor@sysoev.ru>
parents:
69
diff
changeset
|
309 |
436
9549fc9508e5
nginx-0.0.11-2004-09-23-10:32:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
435
diff
changeset
|
310 time_t keepalive_header; /* keepalive_timeout */ |
9549fc9508e5
nginx-0.0.11-2004-09-23-10:32:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
435
diff
changeset
|
311 |
1806 | 312 ngx_uint_t satisfy; /* satisfy */ |
2361 | 313 ngx_uint_t if_modified_since; /* if_modified_since */ |
1806 | 314 |
509 | 315 ngx_flag_t internal; /* internal */ |
633 | 316 ngx_flag_t client_body_in_file_only; /* client_body_in_file_only */ |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
317 ngx_flag_t sendfile; /* sendfile */ |
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
318 ngx_flag_t tcp_nopush; /* tcp_nopush */ |
452 | 319 ngx_flag_t tcp_nodelay; /* tcp_nodelay */ |
346
55e496a8ece3
nginx-0.0.3-2004-06-06-23:49:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
335
diff
changeset
|
320 ngx_flag_t reset_timedout_connection; /* reset_timedout_connection */ |
1804
d457a1576532
several changes in server_name:
Igor Sysoev <igor@sysoev.ru>
parents:
1790
diff
changeset
|
321 ngx_flag_t server_name_in_redirect; /* server_name_in_redirect */ |
521 | 322 ngx_flag_t port_in_redirect; /* port_in_redirect */ |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
323 ngx_flag_t msie_padding; /* msie_padding */ |
679 | 324 ngx_flag_t msie_refresh; /* msie_refresh */ |
527 | 325 ngx_flag_t log_not_found; /* log_not_found */ |
2261 | 326 ngx_flag_t log_subrequest; /* log_subrequest */ |
679 | 327 ngx_flag_t recursive_error_pages; /* recursive_error_pages */ |
1592 | 328 ngx_flag_t server_tokens; /* server_tokens */ |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
329 |
1790
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
330 #if (NGX_HTTP_GZIP) |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
331 ngx_flag_t gzip_vary; /* gzip_vary */ |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
332 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
333 ngx_uint_t gzip_http_version; /* gzip_http_version */ |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
334 ngx_uint_t gzip_proxied; /* gzip_proxied */ |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
335 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
336 #if (NGX_PCRE) |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
337 ngx_array_t *gzip_disable; /* gzip_disable */ |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
338 #endif |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
339 #endif |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
340 |
176
c0552e5ab567
nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents:
162
diff
changeset
|
341 ngx_array_t *error_pages; /* error_page */ |
2407 | 342 ngx_http_try_file_t *try_files; /* try_files */ |
158
d377ee423603
nginx-0.0.1-2003-10-24-10:53:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
154
diff
changeset
|
343 |
479 | 344 ngx_path_t *client_body_temp_path; /* client_body_temp_path */ |
345 | |
1454 | 346 ngx_open_file_cache_t *open_file_cache; |
1767
c42431762903
open_file_cache_retest > open_file_cache_valid
Igor Sysoev <igor@sysoev.ru>
parents:
1652
diff
changeset
|
347 time_t open_file_cache_valid; |
1772 | 348 ngx_uint_t open_file_cache_min_uses; |
1454 | 349 ngx_flag_t open_file_cache_errors; |
1457 | 350 ngx_flag_t open_file_cache_events; |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
351 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
352 ngx_log_t *err_log; |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
190
diff
changeset
|
353 |
589 | 354 ngx_uint_t types_hash_max_size; |
355 ngx_uint_t types_hash_bucket_size; | |
356 | |
2028
bff8689c6953
move configuration phase only field to the end of structure
Igor Sysoev <igor@sysoev.ru>
parents:
2027
diff
changeset
|
357 ngx_queue_t *locations; |
bff8689c6953
move configuration phase only field to the end of structure
Igor Sysoev <igor@sysoev.ru>
parents:
2027
diff
changeset
|
358 |
485 | 359 #if 0 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
360 ngx_http_core_loc_conf_t *prev_location; |
485 | 361 #endif |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
362 }; |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
363 |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
364 |
2027 | 365 typedef struct { |
366 ngx_queue_t queue; | |
367 ngx_http_core_loc_conf_t *exact; | |
368 ngx_http_core_loc_conf_t *inclusive; | |
369 ngx_str_t *name; | |
370 u_char *file_name; | |
371 ngx_uint_t line; | |
372 ngx_queue_t list; | |
373 } ngx_http_location_queue_t; | |
374 | |
375 | |
376 struct ngx_http_location_tree_node_s { | |
377 ngx_http_location_tree_node_t *left; | |
378 ngx_http_location_tree_node_t *right; | |
379 ngx_http_location_tree_node_t *tree; | |
380 | |
381 ngx_http_core_loc_conf_t *exact; | |
382 ngx_http_core_loc_conf_t *inclusive; | |
383 | |
384 u_char auto_redirect; | |
385 u_char len; | |
386 u_char name[1]; | |
387 }; | |
388 | |
389 | |
681 | 390 void ngx_http_core_run_phases(ngx_http_request_t *r); |
391 ngx_int_t ngx_http_core_generic_phase(ngx_http_request_t *r, | |
392 ngx_http_phase_handler_t *ph); | |
393 ngx_int_t ngx_http_core_find_config_phase(ngx_http_request_t *r, | |
394 ngx_http_phase_handler_t *ph); | |
395 ngx_int_t ngx_http_core_post_rewrite_phase(ngx_http_request_t *r, | |
396 ngx_http_phase_handler_t *ph); | |
397 ngx_int_t ngx_http_core_access_phase(ngx_http_request_t *r, | |
398 ngx_http_phase_handler_t *ph); | |
399 ngx_int_t ngx_http_core_post_access_phase(ngx_http_request_t *r, | |
400 ngx_http_phase_handler_t *ph); | |
2407 | 401 ngx_int_t ngx_http_core_try_files_phase(ngx_http_request_t *r, |
402 ngx_http_phase_handler_t *ph); | |
681 | 403 ngx_int_t ngx_http_core_content_phase(ngx_http_request_t *r, |
404 ngx_http_phase_handler_t *ph); | |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
405 |
2138 | 406 |
407 void *ngx_http_test_content_type(ngx_http_request_t *r, ngx_hash_t *types_hash); | |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
408 ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r); |
216
f1d0e5f09c1e
nginx-0.0.1-2003-12-25-23:26:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
210
diff
changeset
|
409 ngx_int_t ngx_http_set_exten(ngx_http_request_t *r); |
557 | 410 u_char *ngx_http_map_uri_to_path(ngx_http_request_t *r, ngx_str_t *name, |
773 | 411 size_t *root_length, size_t reserved); |
539 | 412 ngx_int_t ngx_http_auth_basic_user(ngx_http_request_t *r); |
1804
d457a1576532
several changes in server_name:
Igor Sysoev <igor@sysoev.ru>
parents:
1790
diff
changeset
|
413 ngx_int_t ngx_http_server_addr(ngx_http_request_t *r, ngx_str_t *s); |
1790
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
414 #if (NGX_HTTP_GZIP) |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
415 ngx_int_t ngx_http_gzip_ok(ngx_http_request_t *r); |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
416 #endif |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
417 |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
418 |
509 | 419 ngx_int_t ngx_http_subrequest(ngx_http_request_t *r, |
758
86bb73dc8d40
fix <!--#include virtual=... wait="yes" -->
Igor Sysoev <igor@sysoev.ru>
parents:
681
diff
changeset
|
420 ngx_str_t *uri, ngx_str_t *args, ngx_http_request_t **sr, |
777
4ab852b691f5
<!--#include virtual=... set=... -->
Igor Sysoev <igor@sysoev.ru>
parents:
773
diff
changeset
|
421 ngx_http_post_subrequest_t *psr, ngx_uint_t flags); |
356
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
422 ngx_int_t ngx_http_internal_redirect(ngx_http_request_t *r, |
499 | 423 ngx_str_t *uri, ngx_str_t *args); |
1353 | 424 ngx_int_t ngx_http_named_location(ngx_http_request_t *r, ngx_str_t *name); |
425 | |
485 | 426 |
569 | 427 ngx_http_cleanup_t *ngx_http_cleanup_add(ngx_http_request_t *r, size_t size); |
428 | |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
429 |
356
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
430 typedef ngx_int_t (*ngx_http_output_header_filter_pt)(ngx_http_request_t *r); |
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
431 typedef ngx_int_t (*ngx_http_output_body_filter_pt) |
499 | 432 (ngx_http_request_t *r, ngx_chain_t *chain); |
346
55e496a8ece3
nginx-0.0.3-2004-06-06-23:49:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
335
diff
changeset
|
433 |
55e496a8ece3
nginx-0.0.3-2004-06-06-23:49:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
335
diff
changeset
|
434 |
356
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
435 ngx_int_t ngx_http_output_filter(ngx_http_request_t *r, ngx_chain_t *chain); |
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
436 ngx_int_t ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *chain); |
346
55e496a8ece3
nginx-0.0.3-2004-06-06-23:49:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
335
diff
changeset
|
437 |
55e496a8ece3
nginx-0.0.3-2004-06-06-23:49:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
335
diff
changeset
|
438 |
577 | 439 extern ngx_module_t ngx_http_core_module; |
440 | |
441 extern ngx_uint_t ngx_http_max_module; | |
442 | |
443 | |
444 #define ngx_http_clear_content_length(r) \ | |
445 \ | |
446 r->headers_out.content_length_n = -1; \ | |
447 if (r->headers_out.content_length) { \ | |
448 r->headers_out.content_length->hash = 0; \ | |
449 r->headers_out.content_length = NULL; \ | |
450 } | |
451 \ | |
452 #define ngx_http_clear_accept_ranges(r) \ | |
453 \ | |
581 | 454 r->allow_ranges = 0; \ |
577 | 455 if (r->headers_out.accept_ranges) { \ |
2024 | 456 r->headers_out.accept_ranges->hash = 0; \ |
577 | 457 r->headers_out.accept_ranges = NULL; \ |
458 } | |
459 | |
460 #define ngx_http_clear_last_modified(r) \ | |
461 \ | |
462 r->headers_out.last_modified_time = -1; \ | |
463 if (r->headers_out.last_modified) { \ | |
464 r->headers_out.last_modified->hash = 0; \ | |
465 r->headers_out.last_modified = NULL; \ | |
466 } | |
467 | |
468 | |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
469 #endif /* _NGX_HTTP_CORE_H_INCLUDED_ */ |