comparison src/http/ngx_http_core_module.c @ 200:d2ae1c9f1fd3 NGINX_0_3_47

nginx 0.3.47 *) Feature: the "upstream" directive. *) Change: now the "\" escape symbol in the "\"" and "\'" pairs in the SSI command is always removed.
author Igor Sysoev <http://sysoev.ru>
date Tue, 23 May 2006 00:00:00 +0400
parents e6da4931e0e0
children ca5f86d94316
comparison
equal deleted inserted replaced
199:869664706c09 200:d2ae1c9f1fd3
104 NGX_HTTP_MAIN_CONF_OFFSET, 104 NGX_HTTP_MAIN_CONF_OFFSET,
105 offsetof(ngx_http_core_main_conf_t, server_names_hash_bucket_size), 105 offsetof(ngx_http_core_main_conf_t, server_names_hash_bucket_size),
106 NULL }, 106 NULL },
107 107
108 { ngx_string("server"), 108 { ngx_string("server"),
109 NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, 109 NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_MULTI|NGX_CONF_NOARGS,
110 ngx_http_core_server, 110 ngx_http_core_server,
111 0, 111 0,
112 0, 112 0,
113 NULL }, 113 NULL },
114 114
504 r->write_event_handler = ngx_http_core_run_phases; 504 r->write_event_handler = ngx_http_core_run_phases;
505 505
506 r->valid_unparsed_uri = 1; 506 r->valid_unparsed_uri = 1;
507 r->valid_location = 1; 507 r->valid_location = 1;
508 r->uri_changed = 1; 508 r->uri_changed = 1;
509 r->uri_changes = NGX_HTTP_MAX_REWRITE_CYCLES + 1;
510 509
511 r->phase = (r == r->main) ? NGX_HTTP_POST_READ_PHASE: 510 r->phase = (r == r->main) ? NGX_HTTP_POST_READ_PHASE:
512 NGX_HTTP_SERVER_REWRITE_PHASE; 511 NGX_HTTP_SERVER_REWRITE_PHASE;
513 r->phase_handler = 0; 512 r->phase_handler = 0;
514 513
545 544
546 r->uri_changes--; 545 r->uri_changes--;
547 546
548 if (r->uri_changes == 0) { 547 if (r->uri_changes == 0) {
549 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 548 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
550 "rewrite cycle"); 549 "rewrite or internal redirection cycle");
551 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 550 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
552 return; 551 return;
553 } 552 }
554 553
555 r->phase = NGX_HTTP_FIND_CONFIG_PHASE; 554 r->phase = NGX_HTTP_FIND_CONFIG_PHASE;
1261 sr->fast_subrequest = 1; 1260 sr->fast_subrequest = 1;
1262 1261
1263 sr->discard_body = r->discard_body; 1262 sr->discard_body = r->discard_body;
1264 sr->main_filter_need_in_memory = r->main_filter_need_in_memory; 1263 sr->main_filter_need_in_memory = r->main_filter_need_in_memory;
1265 1264
1265 sr->uri_changes = NGX_HTTP_MAX_URI_CHANGES + 1;
1266
1266 ngx_http_handler(sr); 1267 ngx_http_handler(sr);
1267 1268
1268 if (!c->destroyed) { 1269 if (!c->destroyed) {
1269 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, 1270 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
1270 "http subrequest done \"%V?%V\"", uri, &sr->args); 1271 "http subrequest done \"%V?%V\"", uri, &sr->args);
1328 1329
1329 ngx_http_update_location_config(r); 1330 ngx_http_update_location_config(r);
1330 1331
1331 r->internal = 1; 1332 r->internal = 1;
1332 r->method = NGX_HTTP_GET; 1333 r->method = NGX_HTTP_GET;
1334
1335 r->uri_changes--;
1333 1336
1334 ngx_http_handler(r); 1337 ngx_http_handler(r);
1335 1338
1336 return NGX_DONE; 1339 return NGX_DONE;
1337 } 1340 }
1792 return NGX_CONF_ERROR; 1795 return NGX_CONF_ERROR;
1793 } 1796 }
1794 1797
1795 if (ngx_array_init(&cmcf->servers, cf->pool, 4, 1798 if (ngx_array_init(&cmcf->servers, cf->pool, 4,
1796 sizeof(ngx_http_core_srv_conf_t *)) 1799 sizeof(ngx_http_core_srv_conf_t *))
1797 == NGX_ERROR) 1800 != NGX_OK)
1798 { 1801 {
1799 return NGX_CONF_ERROR; 1802 return NGX_CONF_ERROR;
1800 } 1803 }
1801 1804
1802 cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT; 1805 cmcf->server_names_hash_max_size = NGX_CONF_UNSET_UINT;