comparison src/http/ngx_http_core_module.c @ 26:45fe5b98a9de NGINX_0_1_13

nginx 0.1.13 *) Feature: the server_names_hash and server_names_hash_threshold directives. *) Bugfix: the *.domain.tld names in the "server_name" directive did not work. *) Bugfix: the %request_length log parameter logged the incorrect length.
author Igor Sysoev <http://sysoev.ru>
date Tue, 21 Dec 2004 00:00:00 +0300
parents 8b6db3bda591
children 7ca9bdc82b3f
comparison
equal deleted inserted replaced
25:21488c53e135 26:45fe5b98a9de
58 }; 58 };
59 59
60 60
61 static ngx_command_t ngx_http_core_commands[] = { 61 static ngx_command_t ngx_http_core_commands[] = {
62 62
63 { ngx_string("server_names_hash"),
64 NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
65 ngx_conf_set_num_slot,
66 NGX_HTTP_MAIN_CONF_OFFSET,
67 offsetof(ngx_http_core_main_conf_t, server_names_hash),
68 NULL },
69
70 { ngx_string("server_names_hash_threshold"),
71 NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
72 ngx_conf_set_num_slot,
73 NGX_HTTP_MAIN_CONF_OFFSET,
74 offsetof(ngx_http_core_main_conf_t, server_names_hash_threshold),
75 NULL },
76
63 { ngx_string("server"), 77 { ngx_string("server"),
64 NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, 78 NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
65 ngx_server_block, 79 ngx_server_block,
66 0, 80 0,
67 0, 81 0,
1242 1256
1243 ngx_init_array(cmcf->servers, cf->pool, 1257 ngx_init_array(cmcf->servers, cf->pool,
1244 5, sizeof(ngx_http_core_srv_conf_t *), 1258 5, sizeof(ngx_http_core_srv_conf_t *),
1245 NGX_CONF_ERROR); 1259 NGX_CONF_ERROR);
1246 1260
1261 cmcf->server_names_hash = NGX_CONF_UNSET_UINT;
1262 cmcf->server_names_hash_threshold = NGX_CONF_UNSET_UINT;
1263
1247 return cmcf; 1264 return cmcf;
1248 } 1265 }
1249 1266
1250 1267
1251 static char *ngx_http_core_init_main_conf(ngx_conf_t *cf, void *conf) 1268 static char *ngx_http_core_init_main_conf(ngx_conf_t *cf, void *conf)
1252 { 1269 {
1253 #if 0
1254 ngx_http_core_main_conf_t *cmcf = conf; 1270 ngx_http_core_main_conf_t *cmcf = conf;
1255 1271
1256 /* TODO: remove it if no directives */ 1272 if (cmcf->server_names_hash == NGX_CONF_UNSET_UINT) {
1257 #endif 1273 cmcf->server_names_hash = 1009;
1274 }
1275
1276 if (cmcf->server_names_hash_threshold == NGX_CONF_UNSET_UINT) {
1277 cmcf->server_names_hash_threshold = 50;
1278 }
1258 1279
1259 return NGX_CONF_OK; 1280 return NGX_CONF_OK;
1260 } 1281 }
1261 1282
1262 1283