Mercurial > hg > nginx-vendor-current
comparison src/http/modules/perl/nginx.xs @ 384:12defd37f578 NGINX_0_7_4
nginx 0.7.4
*) Feature: variables support in the "access_log" directive.
*) Feature: the "open_log_file_cache" directive.
*) Feature: the -g switch.
*) Feature: the "Expect" request header line support.
*) Bugfix: large SSI inclusions might be truncated.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 30 Jun 2008 00:00:00 +0400 |
parents | 984bb0b1399b |
children | 0b6053502c55 |
comparison
equal
deleted
inserted
replaced
383:6ee3ada01457 | 384:12defd37f578 |
---|---|
637 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); | 637 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); |
638 if (b->file == NULL) { | 638 if (b->file == NULL) { |
639 XSRETURN_EMPTY; | 639 XSRETURN_EMPTY; |
640 } | 640 } |
641 | 641 |
642 path.len = ngx_strlen(filename); | |
643 | |
644 path.data = ngx_pnalloc(r->pool, path.len + 1); | |
645 if (path.data == NULL) { | |
646 XSRETURN_EMPTY; | |
647 } | |
648 | |
649 (void) ngx_cpystrn(path.data, filename, path.len + 1); | |
650 | |
642 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 651 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
643 | 652 |
644 of.test_dir = 0; | 653 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); |
654 | |
645 of.valid = clcf->open_file_cache_valid; | 655 of.valid = clcf->open_file_cache_valid; |
646 of.min_uses = clcf->open_file_cache_min_uses; | 656 of.min_uses = clcf->open_file_cache_min_uses; |
647 of.errors = clcf->open_file_cache_errors; | 657 of.errors = clcf->open_file_cache_errors; |
648 of.events = clcf->open_file_cache_events; | 658 of.events = clcf->open_file_cache_events; |
649 | |
650 path.len = ngx_strlen(filename); | |
651 | |
652 path.data = ngx_pcalloc(r->pool, path.len + 1); | |
653 if (path.data == NULL) { | |
654 XSRETURN_EMPTY; | |
655 } | |
656 | |
657 (void) ngx_cpystrn(path.data, filename, path.len + 1); | |
658 | 659 |
659 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) | 660 if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) |
660 != NGX_OK) | 661 != NGX_OK) |
661 { | 662 { |
662 if (of.err == 0) { | 663 if (of.err == 0) { |