comparison src/http/ngx_http.c @ 2029:c036922f6f07

*) remove optimize_host_names *) deprecate optimize_server_names: it is not needed since server_name_in_redirect introduction
author Igor Sysoev <igor@sysoev.ru>
date Sat, 24 May 2008 15:43:48 +0000
parents f321b59ae0e9
children 4d8140271204
comparison
equal deleted inserted replaced
2028:bff8689c6953 2029:c036922f6f07
1312 1312
1313 ngx_sort(in_port[p].addrs.elts, (size_t) in_port[p].addrs.nelts, 1313 ngx_sort(in_port[p].addrs.elts, (size_t) in_port[p].addrs.nelts,
1314 sizeof(ngx_http_conf_in_addr_t), ngx_http_cmp_conf_in_addrs); 1314 sizeof(ngx_http_conf_in_addr_t), ngx_http_cmp_conf_in_addrs);
1315 1315
1316 /* 1316 /*
1317 * check whether all name-based servers have the same configuraiton 1317 * check whether all name-based servers have
1318 * as the default server, 1318 * the same configuraiton as the default server
1319 * or some servers disable optimizing the server names
1320 */ 1319 */
1321 1320
1322 in_addr = in_port[p].addrs.elts; 1321 in_addr = in_port[p].addrs.elts;
1323 for (a = 0; a < in_port[p].addrs.nelts; a++) { 1322 for (a = 0; a < in_port[p].addrs.nelts; a++) {
1324 1323
1325 name = in_addr[a].names.elts; 1324 name = in_addr[a].names.elts;
1326 for (s = 0; s < in_addr[a].names.nelts; s++) { 1325 for (s = 0; s < in_addr[a].names.nelts; s++) {
1327 1326
1328 if (in_addr[a].core_srv_conf != name[s].core_srv_conf 1327 if (in_addr[a].core_srv_conf != name[s].core_srv_conf) {
1329 || name[s].core_srv_conf->optimize_server_names == 0)
1330 {
1331 goto virtual_names; 1328 goto virtual_names;
1332 } 1329 }
1333 } 1330 }
1334 1331
1335 /* 1332 /*
1336 * if all name-based servers have the same configuration 1333 * if all name-based servers have the same configuration
1337 * as the default server, 1334 * as the default server, then we do not need to check
1338 * and no servers disable optimizing the server names 1335 * them at run-time at all
1339 * then we do not need to check them at run-time at all
1340 */ 1336 */
1341 1337
1342 in_addr[a].names.nelts = 0; 1338 in_addr[a].names.nelts = 0;
1343 1339
1344 continue; 1340 continue;