thetaphi Sat Nov 29 19:36:41 2008 UTC Modified files: /php-src/sapi/nsapi nsapi.c Log: remove one stat call and replace by cached one http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.95&r2=1.96&diff_format=u Index: php-src/sapi/nsapi/nsapi.c diff -u php-src/sapi/nsapi/nsapi.c:1.95 php-src/sapi/nsapi/nsapi.c:1.96 --- php-src/sapi/nsapi/nsapi.c:1.95 Sat Nov 29 14:44:26 2008 +++ php-src/sapi/nsapi/nsapi.c Sat Nov 29 19:36:40 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: nsapi.c,v 1.95 2008/11/29 14:44:26 thetaphi Exp $ */ +/* $Id: nsapi.c,v 1.96 2008/11/29 19:36:40 thetaphi Exp $ */ /* * PHP includes @@ -321,7 +321,7 @@ PHP_MINFO_FUNCTION(nsapi) { php_info_print_table_start(); - php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.95 $"); + php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.96 $"); php_info_print_table_row(2, "Server Software", system_version()); php_info_print_table_row(2, "Sub-requests with nsapi_virtual()", (nsapi_servact_service)?((zend_ini_long("zlib.output_compression", sizeof("zlib.output_compression"), 0))?"not supported with zlib.output_compression":"enabled"):"not supported on this platform" ); @@ -481,10 +481,6 @@ nsapi_request_context *rc = (nsapi_request_context *)server_context; TSRMLS_FETCH(); - if (!rc) { - return; - } - if (!SG(headers_sent)) { sapi_send_headers(TSRMLS_C); } @@ -965,7 +961,7 @@ int retval; nsapi_request_context *request_context; zend_file_handle file_handle = {0}; - struct stat fst; + struct stat *fst; char *path_info; char *query_string = pblock_findval("query", rq->reqpb); @@ -1037,7 +1033,8 @@ file_handle.free_filename = 0; file_handle.opened_path = NULL; - if (stat(SG(request_info).path_translated, &fst)==0 && S_ISREG(fst.st_mode)) { + fst = request_stat_path(SG(request_info).path_translated, rq); + if (fst && S_ISREG(fst->st_mode)) { if (php_request_startup(TSRMLS_C) == SUCCESS) { php_execute_script(&file_handle TSRMLS_CC); php_request_shutdown(NULL);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php