comparison src/http/ngx_http_core_module.c @ 335:d4241d7787fe

nginx-0.0.3-2004-05-14-20:51:47 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 14 May 2004 16:51:47 +0000
parents af451db3fe99
children 8c5b69141dfd
comparison
equal deleted inserted replaced
334:af451db3fe99 335:d4241d7787fe
35 static char *ngx_http_lowat_check(ngx_conf_t *cf, void *post, void *data); 35 static char *ngx_http_lowat_check(ngx_conf_t *cf, void *post, void *data);
36 36
37 static ngx_conf_post_t ngx_http_lowat_post = { ngx_http_lowat_check } ; 37 static ngx_conf_post_t ngx_http_lowat_post = { ngx_http_lowat_check } ;
38 38
39 39
40 static ngx_conf_enum_t ngx_http_restrict_host_names[] = {
41 { ngx_string("off"), NGX_HTTP_RESTRICT_HOST_OFF },
42 { ngx_string("on"), NGX_HTTP_RESTRICT_HOST_ON },
43 { ngx_string("close"), NGX_HTTP_RESTRICT_HOST_CLOSE },
44 { ngx_null_string, 0 }
45 };
46
47
40 static ngx_command_t ngx_http_core_commands[] = { 48 static ngx_command_t ngx_http_core_commands[] = {
41 49
42 { ngx_string("server"), 50 { ngx_string("server"),
43 NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, 51 NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS,
44 ngx_server_block, 52 ngx_server_block,
85 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG, 93 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
86 ngx_conf_set_flag_slot, 94 ngx_conf_set_flag_slot,
87 NGX_HTTP_SRV_CONF_OFFSET, 95 NGX_HTTP_SRV_CONF_OFFSET,
88 offsetof(ngx_http_core_srv_conf_t, large_client_header), 96 offsetof(ngx_http_core_srv_conf_t, large_client_header),
89 NULL }, 97 NULL },
98
99 { ngx_string("restrict_host_names"),
100 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
101 ngx_conf_set_enum_slot,
102 NGX_HTTP_SRV_CONF_OFFSET,
103 offsetof(ngx_http_core_srv_conf_t, restrict_host_names),
104 &ngx_http_restrict_host_names },
90 105
91 { ngx_string("location"), 106 { ngx_string("location"),
92 NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_TAKE12, 107 NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_TAKE12,
93 ngx_location_block, 108 ngx_location_block,
94 NGX_HTTP_SRV_CONF_OFFSET, 109 NGX_HTTP_SRV_CONF_OFFSET,
1125 cscf->post_accept_timeout = NGX_CONF_UNSET_MSEC; 1140 cscf->post_accept_timeout = NGX_CONF_UNSET_MSEC;
1126 cscf->request_pool_size = NGX_CONF_UNSET_SIZE; 1141 cscf->request_pool_size = NGX_CONF_UNSET_SIZE;
1127 cscf->client_header_timeout = NGX_CONF_UNSET_MSEC; 1142 cscf->client_header_timeout = NGX_CONF_UNSET_MSEC;
1128 cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE; 1143 cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE;
1129 cscf->large_client_header = NGX_CONF_UNSET; 1144 cscf->large_client_header = NGX_CONF_UNSET;
1145 cscf->restrict_host_names = NGX_CONF_UNSET_UINT;
1130 1146
1131 return cscf; 1147 return cscf;
1132 } 1148 }
1133 1149
1134 1150
1180 prev->client_header_timeout, 60000); 1196 prev->client_header_timeout, 60000);
1181 ngx_conf_merge_size_value(conf->client_header_buffer_size, 1197 ngx_conf_merge_size_value(conf->client_header_buffer_size,
1182 prev->client_header_buffer_size, 1024); 1198 prev->client_header_buffer_size, 1024);
1183 ngx_conf_merge_value(conf->large_client_header, 1199 ngx_conf_merge_value(conf->large_client_header,
1184 prev->large_client_header, 1); 1200 prev->large_client_header, 1);
1201 ngx_conf_merge_unsigned_value(conf->restrict_host_names,
1202 prev->restrict_host_names, 0);
1185 1203
1186 return NGX_CONF_OK; 1204 return NGX_CONF_OK;
1187 } 1205 }
1188 1206
1189 1207