Mercurial > hg > nginx-vendor-0-8
comparison src/http/ngx_http.c @ 198:e6da4931e0e0 NGINX_0_3_46
nginx 0.3.46
*) Feature: the "proxy_hide_header", "proxy_pass_header",
"fastcgi_hide_header", and "fastcgi_pass_header" directives.
*) Change: the "proxy_pass_x_powered_by", "fastcgi_x_powered_by", and
"proxy_pass_server" directives were canceled.
*) Feature: the "X-Accel-Buffering" response header line is supported
in proxy mode.
*) Bugfix: the reconfiguration bug and memory leaks in the
ngx_http_perl_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 11 May 2006 00:00:00 +0400 |
parents | 3689cd4e3228 |
children | 38e7b94d63ac |
comparison
equal
deleted
inserted
replaced
197:93658b91fad2 | 198:e6da4931e0e0 |
---|---|
77 u_char ch; | 77 u_char ch; |
78 ngx_int_t rc; | 78 ngx_int_t rc; |
79 ngx_uint_t mi, m, s, l, p, a, i; | 79 ngx_uint_t mi, m, s, l, p, a, i; |
80 ngx_uint_t last, bind_all, done; | 80 ngx_uint_t last, bind_all, done; |
81 ngx_conf_t pcf; | 81 ngx_conf_t pcf; |
82 ngx_array_t in_ports; | 82 ngx_array_t headers_in, in_ports; |
83 ngx_hash_key_t *hk; | |
83 ngx_hash_init_t hash; | 84 ngx_hash_init_t hash; |
84 ngx_listening_t *ls; | 85 ngx_listening_t *ls; |
85 ngx_http_listen_t *lscf; | 86 ngx_http_listen_t *lscf; |
86 ngx_http_module_t *module; | 87 ngx_http_module_t *module; |
88 ngx_http_header_t *header; | |
87 ngx_http_in_port_t *hip; | 89 ngx_http_in_port_t *hip; |
88 ngx_http_handler_pt *h; | 90 ngx_http_handler_pt *h; |
89 ngx_http_conf_ctx_t *ctx; | 91 ngx_http_conf_ctx_t *ctx; |
90 ngx_http_conf_in_port_t *in_port; | 92 ngx_http_conf_in_port_t *in_port; |
91 ngx_http_conf_in_addr_t *in_addr; | 93 ngx_http_conf_in_addr_t *in_addr; |
371 } | 373 } |
372 | 374 |
373 cmcf->phases[NGX_HTTP_LOG_PHASE].type = NGX_OK; | 375 cmcf->phases[NGX_HTTP_LOG_PHASE].type = NGX_OK; |
374 | 376 |
375 | 377 |
376 cmcf->headers_in_hash.max_size = 200; | 378 if (ngx_array_init(&headers_in, cf->temp_pool, 32, sizeof(ngx_hash_key_t)) |
377 cmcf->headers_in_hash.bucket_limit = 1; | |
378 cmcf->headers_in_hash.bucket_size = sizeof(ngx_http_header_t); | |
379 cmcf->headers_in_hash.name = "http headers_in"; | |
380 | |
381 if (ngx_hash0_init(&cmcf->headers_in_hash, cf->pool, ngx_http_headers_in, 0) | |
382 != NGX_OK) | 379 != NGX_OK) |
383 { | 380 { |
384 return NGX_CONF_ERROR; | 381 return NGX_CONF_ERROR; |
385 } | 382 } |
386 | 383 |
387 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, cf->log, 0, | 384 for (header = ngx_http_headers_in; header->name.len; header++) { |
388 "http headers_in hash size: %ui, max buckets per entry: %ui", | 385 hk = ngx_array_push(&headers_in); |
389 cmcf->headers_in_hash.hash_size, | 386 if (hk == NULL) { |
390 cmcf->headers_in_hash.min_buckets); | 387 return NGX_CONF_ERROR; |
388 } | |
389 | |
390 hk->key = header->name; | |
391 hk->key_hash = ngx_hash_key_lc(header->name.data, header->name.len); | |
392 hk->value = header; | |
393 } | |
394 | |
395 hash.hash = &cmcf->headers_in_hash; | |
396 hash.key = ngx_hash_key_lc; | |
397 hash.max_size = 512; | |
398 hash.bucket_size = ngx_cacheline_size; | |
399 hash.name = "headers_in_hash"; | |
400 hash.pool = cf->pool; | |
401 hash.temp_pool = NULL; | |
402 | |
403 if (ngx_hash_init(&hash, headers_in.elts, headers_in.nelts) != NGX_OK) { | |
404 return NGX_CONF_ERROR; | |
405 } | |
406 | |
391 | 407 |
392 for (m = 0; ngx_modules[m]; m++) { | 408 for (m = 0; ngx_modules[m]; m++) { |
393 if (ngx_modules[m]->type != NGX_HTTP_MODULE) { | 409 if (ngx_modules[m]->type != NGX_HTTP_MODULE) { |
394 continue; | 410 continue; |
395 } | 411 } |