Mercurial > hg > nginx-mail
comparison src/http/ngx_http_core_module.c @ 278:704622b2528a NGINX_0_5_9
nginx 0.5.9
*) Change: now the ngx_http_memcached_module uses the $memcached_key
variable value as a key.
*) Feature: the $memcached_key variable.
*) Feature: the "clean" parameter in the "client_body_in_file_only"
directive.
*) Feature: the "env" directive.
*) Feature: the "sendfile" directive is available inside the "if" block.
*) Feature: now on failure of the writing to access nginx logs a
message to error_log, but not more often than once a minute.
*) Bugfix: the "access_log off" directive did not always turn off the
logging.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 25 Jan 2007 00:00:00 +0300 |
parents | 052a7b1d40e5 |
children | 5bef04fc3fd5 |
comparison
equal
deleted
inserted
replaced
277:b3aec7787b8e | 278:704622b2528a |
---|---|
19 | 19 |
20 #define NGX_HTTP_LOCATION_EXACT 1 | 20 #define NGX_HTTP_LOCATION_EXACT 1 |
21 #define NGX_HTTP_LOCATION_AUTO_REDIRECT 2 | 21 #define NGX_HTTP_LOCATION_AUTO_REDIRECT 2 |
22 #define NGX_HTTP_LOCATION_NOREGEX 3 | 22 #define NGX_HTTP_LOCATION_NOREGEX 3 |
23 #define NGX_HTTP_LOCATION_REGEX 4 | 23 #define NGX_HTTP_LOCATION_REGEX 4 |
24 | |
25 | |
26 #define NGX_HTTP_REQUEST_BODY_FILE_OFF 0 | |
27 #define NGX_HTTP_REQUEST_BODY_FILE_ON 1 | |
28 #define NGX_HTTP_REQUEST_BODY_FILE_CLEAN 2 | |
24 | 29 |
25 | 30 |
26 static ngx_int_t ngx_http_core_find_location(ngx_http_request_t *r, | 31 static ngx_int_t ngx_http_core_find_location(ngx_http_request_t *r, |
27 ngx_array_t *locations, size_t len); | 32 ngx_array_t *locations, size_t len); |
28 | 33 |
72 static ngx_conf_deprecated_t ngx_conf_deprecated_optimize_host_names = { | 77 static ngx_conf_deprecated_t ngx_conf_deprecated_optimize_host_names = { |
73 ngx_conf_deprecated, "optimize_host_names", "optimize_server_names" | 78 ngx_conf_deprecated, "optimize_host_names", "optimize_server_names" |
74 }; | 79 }; |
75 | 80 |
76 | 81 |
82 static ngx_conf_enum_t ngx_http_core_request_body_in_file[] = { | |
83 { ngx_string("off"), NGX_HTTP_REQUEST_BODY_FILE_OFF }, | |
84 { ngx_string("on"), NGX_HTTP_REQUEST_BODY_FILE_ON }, | |
85 { ngx_string("clean"), NGX_HTTP_REQUEST_BODY_FILE_CLEAN }, | |
86 { ngx_null_string, 0 } | |
87 }; | |
88 | |
89 | |
77 static ngx_command_t ngx_http_core_commands[] = { | 90 static ngx_command_t ngx_http_core_commands[] = { |
78 | 91 |
79 { ngx_string("variables_hash_max_size"), | 92 { ngx_string("variables_hash_max_size"), |
80 NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, | 93 NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, |
81 ngx_conf_set_num_slot, | 94 ngx_conf_set_num_slot, |
267 offsetof(ngx_http_core_loc_conf_t, client_body_temp_path), | 280 offsetof(ngx_http_core_loc_conf_t, client_body_temp_path), |
268 (void *) ngx_garbage_collector_temp_handler }, | 281 (void *) ngx_garbage_collector_temp_handler }, |
269 | 282 |
270 { ngx_string("client_body_in_file_only"), | 283 { ngx_string("client_body_in_file_only"), |
271 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | 284 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, |
272 ngx_conf_set_flag_slot, | 285 ngx_conf_set_enum_slot, |
273 NGX_HTTP_LOC_CONF_OFFSET, | 286 NGX_HTTP_LOC_CONF_OFFSET, |
274 offsetof(ngx_http_core_loc_conf_t, client_body_in_file_only), | 287 offsetof(ngx_http_core_loc_conf_t, client_body_in_file_only), |
275 NULL }, | 288 &ngx_http_core_request_body_in_file }, |
276 | 289 |
277 { ngx_string("sendfile"), | 290 { ngx_string("sendfile"), |
278 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | 291 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF |
292 |NGX_CONF_TAKE1, | |
279 ngx_conf_set_flag_slot, | 293 ngx_conf_set_flag_slot, |
280 NGX_HTTP_LOC_CONF_OFFSET, | 294 NGX_HTTP_LOC_CONF_OFFSET, |
281 offsetof(ngx_http_core_loc_conf_t, sendfile), | 295 offsetof(ngx_http_core_loc_conf_t, sendfile), |
282 NULL }, | 296 NULL }, |
283 | 297 |
874 } | 888 } |
875 | 889 |
876 if (clcf->client_body_in_file_only) { | 890 if (clcf->client_body_in_file_only) { |
877 r->request_body_in_file_only = 1; | 891 r->request_body_in_file_only = 1; |
878 r->request_body_in_persistent_file = 1; | 892 r->request_body_in_persistent_file = 1; |
893 r->request_body_in_clean_file = | |
894 clcf->client_body_in_file_only == NGX_HTTP_REQUEST_BODY_FILE_CLEAN; | |
879 r->request_body_file_log_level = NGX_LOG_NOTICE; | 895 r->request_body_file_log_level = NGX_LOG_NOTICE; |
880 | 896 |
881 } else { | 897 } else { |
882 r->request_body_file_log_level = NGX_LOG_WARN; | 898 r->request_body_file_log_level = NGX_LOG_WARN; |
883 } | 899 } |