comparison src/http/modules/perl/nginx.xs @ 774:589841f06b87

previous commit broke two modules
author Igor Sysoev <igor@sysoev.ru>
date Thu, 12 Oct 2006 13:56:16 +0000
parents 63a08390a8a2
children 35454083769f
comparison
equal deleted inserted replaced
773:c3ebeee31026 774:589841f06b87
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);