Mercurial > hg > nginx-mail
comparison src/http/ngx_http_core_module.c @ 228:9eebc1b2cdbb NGINX_0_3_61
nginx 0.3.61
*) Change: now the "tcp_nodelay" directive is turned on by default.
*) Feature: the "msie_refresh" directive.
*) Feature: the "recursive_error_pages" directive.
*) Bugfix: the "rewrite" directive returned incorrect redirect, if the
redirect had the captured escaped symbols from original URI.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 28 Aug 2006 00:00:00 +0400 |
parents | 21f2ace7c936 |
children | 38e7b94d63ac |
comparison
equal
deleted
inserted
replaced
227:f554f17a0fb7 | 228:9eebc1b2cdbb |
---|---|
379 ngx_conf_set_flag_slot, | 379 ngx_conf_set_flag_slot, |
380 NGX_HTTP_LOC_CONF_OFFSET, | 380 NGX_HTTP_LOC_CONF_OFFSET, |
381 offsetof(ngx_http_core_loc_conf_t, msie_padding), | 381 offsetof(ngx_http_core_loc_conf_t, msie_padding), |
382 NULL }, | 382 NULL }, |
383 | 383 |
384 { ngx_string("msie_refresh"), | |
385 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
386 ngx_conf_set_flag_slot, | |
387 NGX_HTTP_LOC_CONF_OFFSET, | |
388 offsetof(ngx_http_core_loc_conf_t, msie_refresh), | |
389 NULL }, | |
390 | |
384 { ngx_string("log_not_found"), | 391 { ngx_string("log_not_found"), |
385 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | 392 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, |
386 ngx_conf_set_flag_slot, | 393 ngx_conf_set_flag_slot, |
387 NGX_HTTP_LOC_CONF_OFFSET, | 394 NGX_HTTP_LOC_CONF_OFFSET, |
388 offsetof(ngx_http_core_loc_conf_t, log_not_found), | 395 offsetof(ngx_http_core_loc_conf_t, log_not_found), |
396 NULL }, | |
397 | |
398 { ngx_string("recursive_error_pages"), | |
399 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
400 ngx_conf_set_flag_slot, | |
401 NGX_HTTP_LOC_CONF_OFFSET, | |
402 offsetof(ngx_http_core_loc_conf_t, recursive_error_pages), | |
389 NULL }, | 403 NULL }, |
390 | 404 |
391 { ngx_string("error_page"), | 405 { ngx_string("error_page"), |
392 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF | 406 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF |
393 |NGX_CONF_2MORE, | 407 |NGX_CONF_2MORE, |
545 | 559 |
546 r->uri_changes--; | 560 r->uri_changes--; |
547 | 561 |
548 if (r->uri_changes == 0) { | 562 if (r->uri_changes == 0) { |
549 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | 563 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, |
550 "rewrite or internal redirection cycle"); | 564 "rewrite or internal redirection cycle " |
565 "while processing \"%V\"", &r->uri); | |
551 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 566 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
552 return; | 567 return; |
553 } | 568 } |
554 | 569 |
555 r->phase = NGX_HTTP_FIND_CONFIG_PHASE; | 570 r->phase = NGX_HTTP_FIND_CONFIG_PHASE; |
1179 | 1194 |
1180 r->main->subrequests--; | 1195 r->main->subrequests--; |
1181 | 1196 |
1182 if (r->main->subrequests == 0) { | 1197 if (r->main->subrequests == 0) { |
1183 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | 1198 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, |
1184 "subrequests cycle"); | 1199 "subrequests cycle while processing \"%V\"", uri); |
1185 return NGX_ERROR; | 1200 return NGX_ERROR; |
1186 } | 1201 } |
1187 | 1202 |
1188 sr = ngx_pcalloc(r->pool, sizeof(ngx_http_request_t)); | 1203 sr = ngx_pcalloc(r->pool, sizeof(ngx_http_request_t)); |
1189 if (sr == NULL) { | 1204 if (sr == NULL) { |
1326 | 1341 |
1327 r->uri_changes--; | 1342 r->uri_changes--; |
1328 | 1343 |
1329 if (r->uri_changes == 0) { | 1344 if (r->uri_changes == 0) { |
1330 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | 1345 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, |
1331 "rewrite or internal redirection cycle"); | 1346 "rewrite or internal redirection cycle " |
1347 "while internal redirect to \"%V\"", uri); | |
1348 | |
1332 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 1349 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
1333 return NGX_DONE; | 1350 return NGX_DONE; |
1334 } | 1351 } |
1335 | 1352 |
1336 r->uri = *uri; | 1353 r->uri = *uri; |
2050 lcf->lingering_time = NGX_CONF_UNSET_MSEC; | 2067 lcf->lingering_time = NGX_CONF_UNSET_MSEC; |
2051 lcf->lingering_timeout = NGX_CONF_UNSET_MSEC; | 2068 lcf->lingering_timeout = NGX_CONF_UNSET_MSEC; |
2052 lcf->reset_timedout_connection = NGX_CONF_UNSET; | 2069 lcf->reset_timedout_connection = NGX_CONF_UNSET; |
2053 lcf->port_in_redirect = NGX_CONF_UNSET; | 2070 lcf->port_in_redirect = NGX_CONF_UNSET; |
2054 lcf->msie_padding = NGX_CONF_UNSET; | 2071 lcf->msie_padding = NGX_CONF_UNSET; |
2072 lcf->msie_refresh = NGX_CONF_UNSET; | |
2055 lcf->log_not_found = NGX_CONF_UNSET; | 2073 lcf->log_not_found = NGX_CONF_UNSET; |
2074 lcf->recursive_error_pages = NGX_CONF_UNSET; | |
2056 lcf->types_hash_max_size = NGX_CONF_UNSET_UINT; | 2075 lcf->types_hash_max_size = NGX_CONF_UNSET_UINT; |
2057 lcf->types_hash_bucket_size = NGX_CONF_UNSET_UINT; | 2076 lcf->types_hash_bucket_size = NGX_CONF_UNSET_UINT; |
2058 | 2077 |
2059 return lcf; | 2078 return lcf; |
2060 } | 2079 } |
2204 ngx_conf_merge_value(conf->internal, prev->internal, 0); | 2223 ngx_conf_merge_value(conf->internal, prev->internal, 0); |
2205 ngx_conf_merge_value(conf->client_body_in_file_only, | 2224 ngx_conf_merge_value(conf->client_body_in_file_only, |
2206 prev->client_body_in_file_only, 0); | 2225 prev->client_body_in_file_only, 0); |
2207 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); | 2226 ngx_conf_merge_value(conf->sendfile, prev->sendfile, 0); |
2208 ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0); | 2227 ngx_conf_merge_value(conf->tcp_nopush, prev->tcp_nopush, 0); |
2209 ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 0); | 2228 ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 1); |
2210 | 2229 |
2211 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 60000); | 2230 ngx_conf_merge_msec_value(conf->send_timeout, prev->send_timeout, 60000); |
2212 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); | 2231 ngx_conf_merge_size_value(conf->send_lowat, prev->send_lowat, 0); |
2213 ngx_conf_merge_size_value(conf->postpone_output, prev->postpone_output, | 2232 ngx_conf_merge_size_value(conf->postpone_output, prev->postpone_output, |
2214 1460); | 2233 1460); |
2229 | 2248 |
2230 ngx_conf_merge_value(conf->reset_timedout_connection, | 2249 ngx_conf_merge_value(conf->reset_timedout_connection, |
2231 prev->reset_timedout_connection, 0); | 2250 prev->reset_timedout_connection, 0); |
2232 ngx_conf_merge_value(conf->port_in_redirect, prev->port_in_redirect, 1); | 2251 ngx_conf_merge_value(conf->port_in_redirect, prev->port_in_redirect, 1); |
2233 ngx_conf_merge_value(conf->msie_padding, prev->msie_padding, 1); | 2252 ngx_conf_merge_value(conf->msie_padding, prev->msie_padding, 1); |
2253 ngx_conf_merge_value(conf->msie_refresh, prev->msie_refresh, 0); | |
2234 ngx_conf_merge_value(conf->log_not_found, prev->log_not_found, 1); | 2254 ngx_conf_merge_value(conf->log_not_found, prev->log_not_found, 1); |
2255 ngx_conf_merge_value(conf->recursive_error_pages, | |
2256 prev->recursive_error_pages, 0); | |
2235 | 2257 |
2236 if (conf->open_files == NULL) { | 2258 if (conf->open_files == NULL) { |
2237 conf->open_files = prev->open_files; | 2259 conf->open_files = prev->open_files; |
2238 } | 2260 } |
2239 | 2261 |