Mercurial > hg > nginx-vendor-1-0
comparison src/http/modules/perl/nginx.xs @ 248:acd2ec3541cb NGINX_0_4_9
nginx 0.4.9
*) Feature: the "set" parameter in the "include" SSI command.
*) Feature: the ngx_http_perl_module now tests the nginx.pm module
version.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 13 Oct 2006 00:00:00 +0400 |
parents | ff906029dd40 |
children | 644510700914 |
comparison
equal
deleted
inserted
replaced
247:fcca101509a4 | 248:acd2ec3541cb |
---|---|
451 void | 451 void |
452 filename(r) | 452 filename(r) |
453 CODE: | 453 CODE: |
454 | 454 |
455 dXSTARG; | 455 dXSTARG; |
456 size_t root; | |
456 ngx_http_request_t *r; | 457 ngx_http_request_t *r; |
457 ngx_http_perl_ctx_t *ctx; | 458 ngx_http_perl_ctx_t *ctx; |
458 | 459 |
459 ngx_http_perl_set_request(r); | 460 ngx_http_perl_set_request(r); |
460 | 461 |
461 ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module); | 462 ctx = ngx_http_get_module_ctx(r, ngx_http_perl_module); |
462 if (ctx->filename.data) { | 463 if (ctx->filename.data) { |
463 goto done; | 464 goto done; |
464 } | 465 } |
465 | 466 |
466 if (ngx_http_map_uri_to_path(r, &ctx->filename, 0) == NULL) { | 467 if (ngx_http_map_uri_to_path(r, &ctx->filename, &root, 0) == NULL) { |
467 XSRETURN_UNDEF; | 468 XSRETURN_UNDEF; |
468 } | 469 } |
469 | 470 |
470 ctx->filename.len--; | 471 ctx->filename.len--; |
471 sv_setpv(PL_statname, (char *) ctx->filename.data); | 472 sv_setpv(PL_statname, (char *) ctx->filename.data); |