Mercurial > hg > nginx-quic
annotate src/http/ngx_http_core_module.h @ 4835:a4512d7737f6
Memcached: memcached_gzip_flag directive.
This directive allows to test desired flag as returned by memcached and
sets Content-Encoding to gzip if one found.
This is reimplementation of patch by Tomash Brechko as available on
http://openhack.ru/. It should be a bit more correct though (at least
I think so). In particular, it doesn't try to detect if we are able to
gunzip data, but instead just sets correct Content-Encoding.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Sep 2012 16:43:49 +0000 |
parents | bdcdbdf35b52 |
children | f7fe817c92a2 |
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 |
4412 | 4 * Copyright (C) Nginx, Inc. |
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
|
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 |
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
|
7 |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #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
|
9 #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
|
10 |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
2233 | 12 #include <ngx_config.h> |
13 #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
|
14 #include <ngx_http.h> |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
16 |
1790
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
17 #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
|
18 #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
|
19 #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
|
20 #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
|
21 #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
|
22 #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
|
23 #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
|
24 #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
|
25 #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
|
26 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
27 |
3065 | 28 #define NGX_HTTP_AIO_OFF 0 |
29 #define NGX_HTTP_AIO_ON 1 | |
30 #define NGX_HTTP_AIO_SENDFILE 2 | |
31 | |
32 | |
1806 | 33 #define NGX_HTTP_SATISFY_ALL 0 |
34 #define NGX_HTTP_SATISFY_ANY 1 | |
35 | |
36 | |
3984
3e51832c8215
lingering_close "off|on|always"
Igor Sysoev <igor@sysoev.ru>
parents:
3793
diff
changeset
|
37 #define NGX_HTTP_LINGERING_OFF 0 |
3e51832c8215
lingering_close "off|on|always"
Igor Sysoev <igor@sysoev.ru>
parents:
3793
diff
changeset
|
38 #define NGX_HTTP_LINGERING_ON 1 |
3e51832c8215
lingering_close "off|on|always"
Igor Sysoev <igor@sysoev.ru>
parents:
3793
diff
changeset
|
39 #define NGX_HTTP_LINGERING_ALWAYS 2 |
3e51832c8215
lingering_close "off|on|always"
Igor Sysoev <igor@sysoev.ru>
parents:
3793
diff
changeset
|
40 |
3e51832c8215
lingering_close "off|on|always"
Igor Sysoev <igor@sysoev.ru>
parents:
3793
diff
changeset
|
41 |
2496 | 42 #define NGX_HTTP_IMS_OFF 0 |
43 #define NGX_HTTP_IMS_EXACT 1 | |
44 #define NGX_HTTP_IMS_BEFORE 2 | |
45 | |
46 | |
3793 | 47 #define NGX_HTTP_KEEPALIVE_DISABLE_NONE 0x0002 |
48 #define NGX_HTTP_KEEPALIVE_DISABLE_MSIE6 0x0004 | |
49 #define NGX_HTTP_KEEPALIVE_DISABLE_SAFARI 0x0008 | |
50 | |
51 | |
2027 | 52 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; |
53 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; | |
54 | |
55 | |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
56 typedef struct { |
3395
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
57 union { |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
58 struct sockaddr sockaddr; |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
59 struct sockaddr_in sockaddr_in; |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
60 #if (NGX_HAVE_INET6) |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
61 struct sockaddr_in6 sockaddr_in6; |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
62 #endif |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
63 #if (NGX_HAVE_UNIX_DOMAIN) |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
64 struct sockaddr_un sockaddr_un; |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
65 #endif |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
66 u_char sockaddr_data[NGX_SOCKADDRLEN]; |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
67 } u; |
4e15548b29d4
fix building by gcc 4.4 with -O2/3/s:
Igor Sysoev <igor@sysoev.ru>
parents:
3325
diff
changeset
|
68 |
3220
cdcd9e29c589
*) move sockaddr to the listen options
Igor Sysoev <igor@sysoev.ru>
parents:
3219
diff
changeset
|
69 socklen_t socklen; |
cdcd9e29c589
*) move sockaddr to the listen options
Igor Sysoev <igor@sysoev.ru>
parents:
3219
diff
changeset
|
70 |
3224
8e76e636ae3b
allow to set listen options in any server
Igor Sysoev <igor@sysoev.ru>
parents:
3221
diff
changeset
|
71 unsigned set:1; |
523 | 72 unsigned default_server:1; |
73 unsigned bind:1; | |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
74 unsigned wildcard:1; |
2224 | 75 #if (NGX_HTTP_SSL) |
76 unsigned ssl:1; | |
77 #endif | |
2562 | 78 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) |
4771
bdcdbdf35b52
Core: ipv6only is now on by default.
Ruslan Ermilov <ru@nginx.com>
parents:
4749
diff
changeset
|
79 unsigned ipv6only:1; |
2562 | 80 #endif |
4323
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
4206
diff
changeset
|
81 unsigned so_keepalive:2; |
523 | 82 |
83 int backlog; | |
563 | 84 int rcvbuf; |
85 int sndbuf; | |
3676 | 86 #if (NGX_HAVE_SETFIB) |
87 int setfib; | |
88 #endif | |
4323
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
4206
diff
changeset
|
89 #if (NGX_HAVE_KEEPALIVE_TUNABLE) |
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
4206
diff
changeset
|
90 int tcp_keepidle; |
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
4206
diff
changeset
|
91 int tcp_keepintvl; |
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
4206
diff
changeset
|
92 int tcp_keepcnt; |
c4513d4dd024
Added the "so_keepalive=" parameter to the "listen" directive.
Valentin Bartenev <vbart@nginx.com>
parents:
4206
diff
changeset
|
93 #endif |
523 | 94 |
95 #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) | |
96 char *accept_filter; | |
97 #endif | |
98 #if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT) | |
99 ngx_uint_t deferred_accept; | |
100 #endif | |
101 | |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
102 u_char addr[NGX_SOCKADDR_STRLEN + 1]; |
3217 | 103 } ngx_http_listen_opt_t; |
523 | 104 |
105 | |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
106 typedef enum { |
573 | 107 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
|
108 |
573 | 109 NGX_HTTP_SERVER_REWRITE_PHASE, |
681 | 110 |
573 | 111 NGX_HTTP_FIND_CONFIG_PHASE, |
489 | 112 NGX_HTTP_REWRITE_PHASE, |
681 | 113 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
|
114 |
581 | 115 NGX_HTTP_PREACCESS_PHASE, |
116 | |
368
15c84a40e87d
nginx-0.0.7-2004-06-24-20:07:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
362
diff
changeset
|
117 NGX_HTTP_ACCESS_PHASE, |
681 | 118 NGX_HTTP_POST_ACCESS_PHASE, |
119 | |
2407 | 120 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
|
121 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
|
122 |
581 | 123 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
|
124 } ngx_http_phases; |
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
125 |
681 | 126 typedef struct ngx_http_phase_handler_s ngx_http_phase_handler_t; |
127 | |
128 typedef ngx_int_t (*ngx_http_phase_handler_pt)(ngx_http_request_t *r, | |
129 ngx_http_phase_handler_t *ph); | |
130 | |
131 struct ngx_http_phase_handler_s { | |
132 ngx_http_phase_handler_pt checker; | |
133 ngx_http_handler_pt handler; | |
134 ngx_uint_t next; | |
135 }; | |
136 | |
137 | |
138 typedef struct { | |
139 ngx_http_phase_handler_t *handlers; | |
140 ngx_uint_t server_rewrite_index; | |
1353 | 141 ngx_uint_t location_rewrite_index; |
681 | 142 } ngx_http_phase_engine_t; |
143 | |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
144 |
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
|
145 typedef struct { |
477 | 146 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
|
147 } 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
|
148 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
114
diff
changeset
|
149 |
5526213be452
nginx-0.0.1-2003-10-10-19:10:50 import
Igor Sysoev <igor@sysoev.ru>
parents:
114
diff
changeset
|
150 typedef struct { |
485 | 151 ngx_array_t servers; /* ngx_http_core_srv_conf_t */ |
477 | 152 |
681 | 153 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
|
154 |
649 | 155 ngx_hash_t headers_in_hash; |
611 | 156 |
157 ngx_hash_t variables_hash; | |
158 | |
159 ngx_array_t variables; /* ngx_http_variable_t */ | |
3325 | 160 ngx_uint_t ncaptures; |
507 | 161 |
593 | 162 ngx_uint_t server_names_hash_max_size; |
163 ngx_uint_t server_names_hash_bucket_size; | |
485 | 164 |
611 | 165 ngx_uint_t variables_hash_max_size; |
166 ngx_uint_t variables_hash_bucket_size; | |
167 | |
168 ngx_hash_keys_arrays_t *variables_keys; | |
681 | 169 |
3217 | 170 ngx_array_t *ports; |
171 | |
2407 | 172 ngx_uint_t try_files; /* unsigned try_files:1 */ |
173 | |
681 | 174 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
|
175 } 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
|
176 |
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
89
diff
changeset
|
177 |
37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
Igor Sysoev <igor@sysoev.ru>
parents:
89
diff
changeset
|
178 typedef struct { |
485 | 179 /* array of the ngx_http_server_name_t, "server_name" directive */ |
2027 | 180 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
|
181 |
5659d773cfa8
nginx-0.0.7-2004-07-15-20:35:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
391
diff
changeset
|
182 /* server ctx */ |
2027 | 183 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
|
184 |
2027 | 185 ngx_str_t server_name; |
593 | 186 |
2027 | 187 size_t connection_pool_size; |
188 size_t request_pool_size; | |
189 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
|
190 |
2027 | 191 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
|
192 |
2027 | 193 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
|
194 |
2027 | 195 ngx_flag_t ignore_invalid_headers; |
196 ngx_flag_t merge_slashes; | |
2256 | 197 ngx_flag_t underscores_in_headers; |
2027 | 198 |
3219 | 199 unsigned listen:1; |
200 #if (NGX_PCRE) | |
201 unsigned captures:1; | |
202 #endif | |
3217 | 203 |
2027 | 204 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
|
205 } 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
|
206 |
41
59e7c7f30d49
nginx-0.0.1-2002-12-26-19:26:23 import
Igor Sysoev <igor@sysoev.ru>
parents:
19
diff
changeset
|
207 |
55
cad6c2f43283
nginx-0.0.1-2003-01-29-10:25:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
208 /* 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
|
209 |
593 | 210 |
211 typedef struct { | |
212 /* the default server configuration for this address:port */ | |
3221
c8de5a8b6d17
rename core_srv_conf fields to more understandable default_server and server
Igor Sysoev <igor@sysoev.ru>
parents:
3220
diff
changeset
|
213 ngx_http_core_srv_conf_t *default_server; |
1387 | 214 |
2689
6caf687a831f
backout r2535: virtual names is a property of address:port pair,
Igor Sysoev <igor@sysoev.ru>
parents:
2589
diff
changeset
|
215 ngx_http_virtual_names_t *virtual_names; |
6caf687a831f
backout r2535: virtual names is a property of address:port pair,
Igor Sysoev <igor@sysoev.ru>
parents:
2589
diff
changeset
|
216 |
2224 | 217 #if (NGX_HTTP_SSL) |
218 ngx_uint_t ssl; /* unsigned ssl:1; */ | |
219 #endif | |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
220 } ngx_http_addr_conf_t; |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
221 |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
222 |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
223 typedef struct { |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
224 in_addr_t addr; |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
225 ngx_http_addr_conf_t conf; |
593 | 226 } ngx_http_in_addr_t; |
227 | |
228 | |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
229 #if (NGX_HAVE_INET6) |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
230 |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
231 typedef struct { |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
232 struct in6_addr addr6; |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
233 ngx_http_addr_conf_t conf; |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
234 } ngx_http_in6_addr_t; |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
235 |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
236 #endif |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
237 |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
238 |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
239 typedef struct { |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
240 /* ngx_http_in_addr_t or ngx_http_in6_addr_t */ |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
241 void *addrs; |
593 | 242 ngx_uint_t naddrs; |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
243 } ngx_http_port_t; |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
244 |
89
29bf798b583f
nginx-0.0.1-2003-05-15-19:42:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
88
diff
changeset
|
245 |
593 | 246 typedef struct { |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
247 ngx_int_t family; |
593 | 248 in_port_t port; |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
249 ngx_array_t addrs; /* array of ngx_http_conf_addr_t */ |
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
250 } ngx_http_conf_port_t; |
593 | 251 |
252 | |
253 typedef struct { | |
3220
cdcd9e29c589
*) move sockaddr to the listen options
Igor Sysoev <igor@sysoev.ru>
parents:
3219
diff
changeset
|
254 ngx_http_listen_opt_t opt; |
477 | 255 |
593 | 256 ngx_hash_t hash; |
1253
8ef04207c84f
the "www.example.*" wildcard hash support
Igor Sysoev <igor@sysoev.ru>
parents:
1236
diff
changeset
|
257 ngx_hash_wildcard_t *wc_head; |
8ef04207c84f
the "www.example.*" wildcard hash support
Igor Sysoev <igor@sysoev.ru>
parents:
1236
diff
changeset
|
258 ngx_hash_wildcard_t *wc_tail; |
593 | 259 |
1387 | 260 #if (NGX_PCRE) |
261 ngx_uint_t nregex; | |
262 ngx_http_server_name_t *regex; | |
263 #endif | |
264 | |
477 | 265 /* the default server configuration for this address:port */ |
3221
c8de5a8b6d17
rename core_srv_conf fields to more understandable default_server and server
Igor Sysoev <igor@sysoev.ru>
parents:
3220
diff
changeset
|
266 ngx_http_core_srv_conf_t *default_server; |
3219 | 267 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */ |
2512
2e91aecb9e57
a prelimiary IPv6 support, HTTP listen
Igor Sysoev <igor@sysoev.ru>
parents:
2496
diff
changeset
|
268 } ngx_http_conf_addr_t; |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
269 |
89
29bf798b583f
nginx-0.0.1-2003-05-15-19:42:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
88
diff
changeset
|
270 |
1387 | 271 struct ngx_http_server_name_s { |
272 #if (NGX_PCRE) | |
3325 | 273 ngx_http_regex_t *regex; |
1387 | 274 #endif |
3221
c8de5a8b6d17
rename core_srv_conf fields to more understandable default_server and server
Igor Sysoev <igor@sysoev.ru>
parents:
3220
diff
changeset
|
275 ngx_http_core_srv_conf_t *server; /* 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
|
276 ngx_str_t name; |
1387 | 277 }; |
55
cad6c2f43283
nginx-0.0.1-2003-01-29-10:25:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
278 |
cad6c2f43283
nginx-0.0.1-2003-01-29-10:25:51 import
Igor Sysoev <igor@sysoev.ru>
parents:
54
diff
changeset
|
279 |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
280 typedef struct { |
673 | 281 ngx_int_t status; |
282 ngx_int_t overwrite; | |
2589
859f6675a553
use complex value in error_page
Igor Sysoev <igor@sysoev.ru>
parents:
2562
diff
changeset
|
283 ngx_http_complex_value_t value; |
1982
dd388c80f5a2
args support in static error_page
Igor Sysoev <igor@sysoev.ru>
parents:
1806
diff
changeset
|
284 ngx_str_t args; |
176
c0552e5ab567
nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents:
162
diff
changeset
|
285 } 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
|
286 |
c0552e5ab567
nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents:
162
diff
changeset
|
287 |
2407 | 288 typedef struct { |
289 ngx_array_t *lengths; | |
290 ngx_array_t *values; | |
291 ngx_str_t name; | |
2695 | 292 |
293 unsigned code:10; | |
294 unsigned test_dir:1; | |
2407 | 295 } ngx_http_try_file_t; |
296 | |
297 | |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
298 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
|
299 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
|
300 |
455 | 301 #if (NGX_PCRE) |
3325 | 302 ngx_http_regex_t *regex; |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
303 #endif |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
304 |
1353 | 305 unsigned noname:1; /* "if () {}" block or limit_except */ |
3731
72cc5b789021
inherit proxy_pass, fastcgi_pass, uwsgi_pass, scgi_pass inside
Igor Sysoev <igor@sysoev.ru>
parents:
3676
diff
changeset
|
306 unsigned lmt_excpt:1; |
1353 | 307 unsigned named:1; |
485 | 308 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
309 unsigned exact_match:1; |
467 | 310 unsigned noregex:1; |
311 | |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
312 unsigned auto_redirect:1; |
2205 | 313 #if (NGX_HTTP_GZIP) |
314 unsigned gzip_disable_msie6:2; | |
3773 | 315 #if (NGX_HTTP_DEGRADATION) |
316 unsigned gzip_disable_degradation:2; | |
317 #endif | |
2205 | 318 #endif |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
319 |
2027 | 320 ngx_http_location_tree_node_t *static_locations; |
2546
8b9861c2a32f
pclcf->regex_locations are used with PCRE only
Igor Sysoev <igor@sysoev.ru>
parents:
2534
diff
changeset
|
321 #if (NGX_PCRE) |
2027 | 322 ngx_http_core_loc_conf_t **regex_locations; |
2546
8b9861c2a32f
pclcf->regex_locations are used with PCRE only
Igor Sysoev <igor@sysoev.ru>
parents:
2534
diff
changeset
|
323 #endif |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
324 |
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
325 /* pointer to the modules' loc_conf */ |
2024 | 326 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
|
327 |
631 | 328 uint32_t limit_except; |
2024 | 329 void **limit_except_loc_conf; |
631 | 330 |
356
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
331 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
|
332 |
3535
abb3901be800
fix handling an inherited alias in inclusive location
Igor Sysoev <igor@sysoev.ru>
parents:
3484
diff
changeset
|
333 /* location name length for inclusive location with inherited alias */ |
abb3901be800
fix handling an inherited alias in inclusive location
Igor Sysoev <igor@sysoev.ru>
parents:
3484
diff
changeset
|
334 size_t alias; |
577 | 335 ngx_str_t root; /* root, alias */ |
336 ngx_str_t post_action; | |
337 | |
595 | 338 ngx_array_t *root_lengths; |
339 ngx_array_t *root_values; | |
340 | |
589 | 341 ngx_array_t *types; |
342 ngx_hash_t types_hash; | |
343 ngx_str_t default_type; | |
344 | |
663 | 345 off_t client_max_body_size; /* client_max_body_size */ |
2129 | 346 off_t directio; /* directio */ |
3053 | 347 off_t directio_alignment; /* directio_alignment */ |
663 | 348 |
303
00c5660d2707
nginx-0.0.3-2004-04-01-20:20:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
293
diff
changeset
|
349 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
|
350 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
|
351 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
|
352 size_t limit_rate; /* limit_rate */ |
2907 | 353 size_t limit_rate_after; /* limit_rate_after */ |
1197 | 354 size_t sendfile_max_chunk; /* sendfile_max_chunk */ |
3178 | 355 size_t read_ahead; /* read_ahead */ |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
356 |
162
96993d4d5067
nginx-0.0.1-2003-10-28-00:01:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
158
diff
changeset
|
357 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
|
358 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
|
359 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
|
360 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
|
361 ngx_msec_t lingering_timeout; /* lingering_timeout */ |
1652
cc7a7d0b89e8
http resolver and resolver_timeout
Igor Sysoev <igor@sysoev.ru>
parents:
1592
diff
changeset
|
362 ngx_msec_t resolver_timeout; /* resolver_timeout */ |
cc7a7d0b89e8
http resolver and resolver_timeout
Igor Sysoev <igor@sysoev.ru>
parents:
1592
diff
changeset
|
363 |
cc7a7d0b89e8
http resolver and resolver_timeout
Igor Sysoev <igor@sysoev.ru>
parents:
1592
diff
changeset
|
364 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
|
365 |
436
9549fc9508e5
nginx-0.0.11-2004-09-23-10:32:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
435
diff
changeset
|
366 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
|
367 |
2888 | 368 ngx_uint_t keepalive_requests; /* keepalive_requests */ |
3793 | 369 ngx_uint_t keepalive_disable; /* keepalive_disable */ |
1806 | 370 ngx_uint_t satisfy; /* satisfy */ |
3984
3e51832c8215
lingering_close "off|on|always"
Igor Sysoev <igor@sysoev.ru>
parents:
3793
diff
changeset
|
371 ngx_uint_t lingering_close; /* lingering_close */ |
2361 | 372 ngx_uint_t if_modified_since; /* if_modified_since */ |
4062 | 373 ngx_uint_t max_ranges; /* max_ranges */ |
2841
faafc084a7a4
fix client_body_in_file_only type
Igor Sysoev <igor@sysoev.ru>
parents:
2785
diff
changeset
|
374 ngx_uint_t client_body_in_file_only; /* client_body_in_file_only */ |
1806 | 375 |
2845 | 376 ngx_flag_t client_body_in_single_buffer; |
377 /* client_body_in_singe_buffer */ | |
509 | 378 ngx_flag_t internal; /* internal */ |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
379 ngx_flag_t sendfile; /* sendfile */ |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2979
diff
changeset
|
380 #if (NGX_HAVE_FILE_AIO) |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2979
diff
changeset
|
381 ngx_flag_t aio; /* aio */ |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2979
diff
changeset
|
382 #endif |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
383 ngx_flag_t tcp_nopush; /* tcp_nopush */ |
452 | 384 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
|
385 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
|
386 ngx_flag_t server_name_in_redirect; /* server_name_in_redirect */ |
521 | 387 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
|
388 ngx_flag_t msie_padding; /* msie_padding */ |
679 | 389 ngx_flag_t msie_refresh; /* msie_refresh */ |
527 | 390 ngx_flag_t log_not_found; /* log_not_found */ |
2261 | 391 ngx_flag_t log_subrequest; /* log_subrequest */ |
679 | 392 ngx_flag_t recursive_error_pages; /* recursive_error_pages */ |
1592 | 393 ngx_flag_t server_tokens; /* server_tokens */ |
3484 | 394 ngx_flag_t chunked_transfer_encoding; /* chunked_transfer_encoding */ |
4749
613750237b36
Entity tags: the "etag" directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4748
diff
changeset
|
395 ngx_flag_t etag; /* etag */ |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
257
diff
changeset
|
396 |
1790
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
397 #if (NGX_HTTP_GZIP) |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
398 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
|
399 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
400 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
|
401 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
|
402 |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
403 #if (NGX_PCRE) |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
404 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
|
405 #endif |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
406 #endif |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
407 |
4477
7033faf6dc3c
Added disable_symlinks directive.
Andrey Belov <defan@nginx.com>
parents:
4412
diff
changeset
|
408 #if (NGX_HAVE_OPENAT) |
7033faf6dc3c
Added disable_symlinks directive.
Andrey Belov <defan@nginx.com>
parents:
4412
diff
changeset
|
409 ngx_uint_t disable_symlinks; /* disable_symlinks */ |
4495
b4379a91f9b5
Disable symlinks: added the "from=" parameter to the "disable_symlinks"
Valentin Bartenev <vbart@nginx.com>
parents:
4494
diff
changeset
|
410 ngx_http_complex_value_t *disable_symlinks_from; |
4477
7033faf6dc3c
Added disable_symlinks directive.
Andrey Belov <defan@nginx.com>
parents:
4412
diff
changeset
|
411 #endif |
7033faf6dc3c
Added disable_symlinks directive.
Andrey Belov <defan@nginx.com>
parents:
4412
diff
changeset
|
412 |
176
c0552e5ab567
nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Igor Sysoev <igor@sysoev.ru>
parents:
162
diff
changeset
|
413 ngx_array_t *error_pages; /* error_page */ |
2407 | 414 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
|
415 |
479 | 416 ngx_path_t *client_body_temp_path; /* client_body_temp_path */ |
417 | |
1454 | 418 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
|
419 time_t open_file_cache_valid; |
1772 | 420 ngx_uint_t open_file_cache_min_uses; |
1454 | 421 ngx_flag_t open_file_cache_errors; |
1457 | 422 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
|
423 |
2785
d478379e51ac
*) refactor error_log processing: listen socket log might inherit built-in
Igor Sysoev <igor@sysoev.ru>
parents:
2701
diff
changeset
|
424 ngx_log_t *error_log; |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
190
diff
changeset
|
425 |
589 | 426 ngx_uint_t types_hash_max_size; |
427 ngx_uint_t types_hash_bucket_size; | |
428 | |
2028
bff8689c6953
move configuration phase only field to the end of structure
Igor Sysoev <igor@sysoev.ru>
parents:
2027
diff
changeset
|
429 ngx_queue_t *locations; |
bff8689c6953
move configuration phase only field to the end of structure
Igor Sysoev <igor@sysoev.ru>
parents:
2027
diff
changeset
|
430 |
485 | 431 #if 0 |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
432 ngx_http_core_loc_conf_t *prev_location; |
485 | 433 #endif |
396
6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
395
diff
changeset
|
434 }; |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
435 |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
436 |
2027 | 437 typedef struct { |
438 ngx_queue_t queue; | |
439 ngx_http_core_loc_conf_t *exact; | |
440 ngx_http_core_loc_conf_t *inclusive; | |
441 ngx_str_t *name; | |
442 u_char *file_name; | |
443 ngx_uint_t line; | |
444 ngx_queue_t list; | |
445 } ngx_http_location_queue_t; | |
446 | |
447 | |
448 struct ngx_http_location_tree_node_s { | |
449 ngx_http_location_tree_node_t *left; | |
450 ngx_http_location_tree_node_t *right; | |
451 ngx_http_location_tree_node_t *tree; | |
452 | |
453 ngx_http_core_loc_conf_t *exact; | |
454 ngx_http_core_loc_conf_t *inclusive; | |
455 | |
456 u_char auto_redirect; | |
457 u_char len; | |
458 u_char name[1]; | |
459 }; | |
460 | |
461 | |
681 | 462 void ngx_http_core_run_phases(ngx_http_request_t *r); |
463 ngx_int_t ngx_http_core_generic_phase(ngx_http_request_t *r, | |
464 ngx_http_phase_handler_t *ph); | |
3634
40e356cf4176
add files missed in the previuos commit
Igor Sysoev <igor@sysoev.ru>
parents:
3632
diff
changeset
|
465 ngx_int_t ngx_http_core_rewrite_phase(ngx_http_request_t *r, |
40e356cf4176
add files missed in the previuos commit
Igor Sysoev <igor@sysoev.ru>
parents:
3632
diff
changeset
|
466 ngx_http_phase_handler_t *ph); |
681 | 467 ngx_int_t ngx_http_core_find_config_phase(ngx_http_request_t *r, |
468 ngx_http_phase_handler_t *ph); | |
469 ngx_int_t ngx_http_core_post_rewrite_phase(ngx_http_request_t *r, | |
470 ngx_http_phase_handler_t *ph); | |
471 ngx_int_t ngx_http_core_access_phase(ngx_http_request_t *r, | |
472 ngx_http_phase_handler_t *ph); | |
473 ngx_int_t ngx_http_core_post_access_phase(ngx_http_request_t *r, | |
474 ngx_http_phase_handler_t *ph); | |
2407 | 475 ngx_int_t ngx_http_core_try_files_phase(ngx_http_request_t *r, |
476 ngx_http_phase_handler_t *ph); | |
681 | 477 ngx_int_t ngx_http_core_content_phase(ngx_http_request_t *r, |
478 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
|
479 |
2138 | 480 |
481 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
|
482 ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r); |
2979
b941147f2b2e
ngx_http_set_exten() is always successful since 0.3.46
Igor Sysoev <igor@sysoev.ru>
parents:
2907
diff
changeset
|
483 void ngx_http_set_exten(ngx_http_request_t *r); |
4748
192f54280a7a
Entity tags: set for static respones.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4746
diff
changeset
|
484 ngx_int_t ngx_http_set_etag(ngx_http_request_t *r); |
3632 | 485 ngx_int_t ngx_http_send_response(ngx_http_request_t *r, ngx_uint_t status, |
486 ngx_str_t *ct, ngx_http_complex_value_t *cv); | |
557 | 487 u_char *ngx_http_map_uri_to_path(ngx_http_request_t *r, ngx_str_t *name, |
773 | 488 size_t *root_length, size_t reserved); |
539 | 489 ngx_int_t ngx_http_auth_basic_user(ngx_http_request_t *r); |
1790
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
490 #if (NGX_HTTP_GZIP) |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
491 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
|
492 #endif |
775edc46ee66
ngx_http_gzip_static_module and gzip_disable
Igor Sysoev <igor@sysoev.ru>
parents:
1772
diff
changeset
|
493 |
201
267ea1d98683
nginx-0.0.1-2003-11-30-23:03:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
494 |
509 | 495 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
|
496 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
|
497 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
|
498 ngx_int_t ngx_http_internal_redirect(ngx_http_request_t *r, |
499 | 499 ngx_str_t *uri, ngx_str_t *args); |
1353 | 500 ngx_int_t ngx_http_named_location(ngx_http_request_t *r, ngx_str_t *name); |
501 | |
485 | 502 |
569 | 503 ngx_http_cleanup_t *ngx_http_cleanup_add(ngx_http_request_t *r, size_t size); |
504 | |
44
0e81ac0bb3e2
nginx-0.0.1-2003-01-09-08:36:00 import
Igor Sysoev <igor@sysoev.ru>
parents:
41
diff
changeset
|
505 |
356
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
506 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
|
507 typedef ngx_int_t (*ngx_http_output_body_filter_pt) |
499 | 508 (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
|
509 |
55e496a8ece3
nginx-0.0.3-2004-06-06-23:49:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
335
diff
changeset
|
510 |
356
2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
Igor Sysoev <igor@sysoev.ru>
parents:
346
diff
changeset
|
511 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
|
512 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
|
513 |
55e496a8ece3
nginx-0.0.3-2004-06-06-23:49:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
335
diff
changeset
|
514 |
4494
13e09cf11d4e
Disable symlinks: initialization of the "disable_symlinks" field in
Valentin Bartenev <vbart@nginx.com>
parents:
4477
diff
changeset
|
515 ngx_int_t ngx_http_set_disable_symlinks(ngx_http_request_t *r, |
13e09cf11d4e
Disable symlinks: initialization of the "disable_symlinks" field in
Valentin Bartenev <vbart@nginx.com>
parents:
4477
diff
changeset
|
516 ngx_http_core_loc_conf_t *clcf, ngx_str_t *path, ngx_open_file_info_t *of); |
13e09cf11d4e
Disable symlinks: initialization of the "disable_symlinks" field in
Valentin Bartenev <vbart@nginx.com>
parents:
4477
diff
changeset
|
517 |
4623
ed3d0cc6de5a
New function ngx_http_get_forwarded_addr() to look up real client address.
Ruslan Ermilov <ru@nginx.com>
parents:
4495
diff
changeset
|
518 ngx_int_t ngx_http_get_forwarded_addr(ngx_http_request_t *r, ngx_addr_t *addr, |
ed3d0cc6de5a
New function ngx_http_get_forwarded_addr() to look up real client address.
Ruslan Ermilov <ru@nginx.com>
parents:
4495
diff
changeset
|
519 u_char *xff, size_t xfflen, ngx_array_t *proxies, int recursive); |
ed3d0cc6de5a
New function ngx_http_get_forwarded_addr() to look up real client address.
Ruslan Ermilov <ru@nginx.com>
parents:
4495
diff
changeset
|
520 |
4494
13e09cf11d4e
Disable symlinks: initialization of the "disable_symlinks" field in
Valentin Bartenev <vbart@nginx.com>
parents:
4477
diff
changeset
|
521 |
577 | 522 extern ngx_module_t ngx_http_core_module; |
523 | |
524 extern ngx_uint_t ngx_http_max_module; | |
525 | |
2701 | 526 extern ngx_str_t ngx_http_core_get_method; |
527 | |
577 | 528 |
529 #define ngx_http_clear_content_length(r) \ | |
530 \ | |
531 r->headers_out.content_length_n = -1; \ | |
532 if (r->headers_out.content_length) { \ | |
533 r->headers_out.content_length->hash = 0; \ | |
534 r->headers_out.content_length = NULL; \ | |
535 } | |
536 \ | |
537 #define ngx_http_clear_accept_ranges(r) \ | |
538 \ | |
581 | 539 r->allow_ranges = 0; \ |
577 | 540 if (r->headers_out.accept_ranges) { \ |
2024 | 541 r->headers_out.accept_ranges->hash = 0; \ |
577 | 542 r->headers_out.accept_ranges = NULL; \ |
543 } | |
544 | |
545 #define ngx_http_clear_last_modified(r) \ | |
546 \ | |
547 r->headers_out.last_modified_time = -1; \ | |
548 if (r->headers_out.last_modified) { \ | |
549 r->headers_out.last_modified->hash = 0; \ | |
550 r->headers_out.last_modified = NULL; \ | |
551 } | |
552 | |
4206
1a94a56a4e5d
Clear old Location header (if any) while adding a new one.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4062
diff
changeset
|
553 #define ngx_http_clear_location(r) \ |
1a94a56a4e5d
Clear old Location header (if any) while adding a new one.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4062
diff
changeset
|
554 \ |
1a94a56a4e5d
Clear old Location header (if any) while adding a new one.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4062
diff
changeset
|
555 if (r->headers_out.location) { \ |
1a94a56a4e5d
Clear old Location header (if any) while adding a new one.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4062
diff
changeset
|
556 r->headers_out.location->hash = 0; \ |
1a94a56a4e5d
Clear old Location header (if any) while adding a new one.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4062
diff
changeset
|
557 r->headers_out.location = NULL; \ |
1a94a56a4e5d
Clear old Location header (if any) while adding a new one.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4062
diff
changeset
|
558 } |
1a94a56a4e5d
Clear old Location header (if any) while adding a new one.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4062
diff
changeset
|
559 |
4746
4a18bf1833a9
Entity tags: clear on entity changes.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4623
diff
changeset
|
560 #define ngx_http_clear_etag(r) \ |
4a18bf1833a9
Entity tags: clear on entity changes.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4623
diff
changeset
|
561 \ |
4a18bf1833a9
Entity tags: clear on entity changes.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4623
diff
changeset
|
562 if (r->headers_out.etag) { \ |
4a18bf1833a9
Entity tags: clear on entity changes.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4623
diff
changeset
|
563 r->headers_out.etag->hash = 0; \ |
4a18bf1833a9
Entity tags: clear on entity changes.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4623
diff
changeset
|
564 r->headers_out.etag = NULL; \ |
4a18bf1833a9
Entity tags: clear on entity changes.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4623
diff
changeset
|
565 } |
4a18bf1833a9
Entity tags: clear on entity changes.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4623
diff
changeset
|
566 |
577 | 567 |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
568 #endif /* _NGX_HTTP_CORE_H_INCLUDED_ */ |