comparison src/http/ngx_http_core_module.h @ 138:8e6d4d96ec4c NGINX_0_3_16

nginx 0.3.16 *) Feature: the ngx_http_map_module. *) Feature: the "types_hash_max_size" and "types_hash_bucket_size" directives. *) Feature: the "ssi_value_length" directive. *) Feature: the "worker_rlimit_core" directive. *) Workaround: the connection number in logs was always 1 if nginx was built by the icc 8.1 or 9.0 compilers with optimization for Pentium 4. *) Bugfix: the "config timefmt" SSI command set incorrect time format. *) Bugfix: nginx did not close connection to IMAP/POP3 backend for the SSL connections; bug appeared in 0.3.13. Thanks to Rob Mueller. *) Bugfix: segmentation fault may occurred in at SSL shutdown; bug appeared in 0.3.13.
author Igor Sysoev <http://sysoev.ru>
date Fri, 16 Dec 2005 00:00:00 +0300
parents 82d695e3d662
children 84910468f6de
comparison
equal deleted inserted replaced
137:768f51dd150b 138:8e6d4d96ec4c
68 typedef struct { 68 typedef struct {
69 ngx_array_t servers; /* ngx_http_core_srv_conf_t */ 69 ngx_array_t servers; /* ngx_http_core_srv_conf_t */
70 70
71 ngx_http_phase_t phases[NGX_HTTP_LOG_PHASE + 1]; 71 ngx_http_phase_t phases[NGX_HTTP_LOG_PHASE + 1];
72 72
73 ngx_hash_t headers_in_hash; 73 ngx_hash0_t headers_in_hash;
74 ngx_hash_t variables_hash; 74 ngx_hash0_t variables_hash;
75 75
76 ngx_uint_t server_names_hash; 76 ngx_uint_t server_names_hash;
77 ngx_uint_t server_names_hash_threshold; 77 ngx_uint_t server_names_hash_threshold;
78 78
79 size_t max_server_name_len; 79 size_t max_server_name_len;
152 } \ 152 } \
153 key %= prime; \ 153 key %= prime; \
154 } 154 }
155 155
156 156
157 #define NGX_HTTP_TYPES_HASH_PRIME 13
158
159 #define ngx_http_types_hash_key(key, ext) \
160 { \
161 ngx_uint_t n; \
162 for (key = 0, n = 0; n < ext.len; n++) { \
163 key += ext.data[n]; \
164 } \
165 key %= NGX_HTTP_TYPES_HASH_PRIME; \
166 }
167
168 typedef struct {
169 ngx_str_t exten;
170 ngx_str_t type;
171 } ngx_http_type_t;
172
173
174 typedef struct { 157 typedef struct {
175 ngx_int_t status; 158 ngx_int_t status;
176 ngx_int_t overwrite; 159 ngx_int_t overwrite;
177 ngx_str_t uri; 160 ngx_str_t uri;
178 } ngx_http_err_page_t; 161 } ngx_http_err_page_t;
201 /* pointer to the modules' loc_conf */ 184 /* pointer to the modules' loc_conf */
202 void **loc_conf ; 185 void **loc_conf ;
203 186
204 ngx_http_handler_pt handler; 187 ngx_http_handler_pt handler;
205 188
206 ngx_array_t *types;
207 ngx_str_t default_type;
208
209 ngx_str_t root; /* root, alias */ 189 ngx_str_t root; /* root, alias */
210 ngx_str_t post_action; 190 ngx_str_t post_action;
191
192 ngx_array_t *types;
193 ngx_hash_t types_hash;
194 ngx_str_t default_type;
211 195
212 size_t client_max_body_size; /* client_max_body_size */ 196 size_t client_max_body_size; /* client_max_body_size */
213 size_t client_body_buffer_size; /* client_body_buffer_size */ 197 size_t client_body_buffer_size; /* client_body_buffer_size */
214 size_t send_lowat; /* send_lowat */ 198 size_t send_lowat; /* send_lowat */
215 size_t postpone_output; /* postpone_output */ 199 size_t postpone_output; /* postpone_output */
239 223
240 ngx_http_cache_hash_t *open_files; 224 ngx_http_cache_hash_t *open_files;
241 225
242 ngx_log_t *err_log; 226 ngx_log_t *err_log;
243 227
228 ngx_uint_t types_hash_max_size;
229 ngx_uint_t types_hash_bucket_size;
230
244 #if 0 231 #if 0
245 ngx_http_core_loc_conf_t *prev_location; 232 ngx_http_core_loc_conf_t *prev_location;
246 #endif 233 #endif
247 }; 234 };
248 235