thetaphi Sat Nov 29 19:37:06 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/sapi/nsapi nsapi.c Log: MFH: remove one stat call and replace by cached one http://cvs.php.net/viewvc.cgi/php-src/sapi/nsapi/nsapi.c?r1=1.69.2.3.2.6.2.10&r2=1.69.2.3.2.6.2.11&diff_format=u Index: php-src/sapi/nsapi/nsapi.c diff -u php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.6.2.10 php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.6.2.11 --- php-src/sapi/nsapi/nsapi.c:1.69.2.3.2.6.2.10 Sat Nov 29 14:45:51 2008 +++ php-src/sapi/nsapi/nsapi.c Sat Nov 29 19:37:06 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: nsapi.c,v 1.69.2.3.2.6.2.10 2008/11/29 14:45:51 thetaphi Exp $ */ +/* $Id: nsapi.c,v 1.69.2.3.2.6.2.11 2008/11/29 19:37:06 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.69.2.3.2.6.2.10 $"); + php_info_print_table_row(2, "NSAPI Module Revision", "$Revision: 1.69.2.3.2.6.2.11 $"); 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" ); @@ -483,10 +483,6 @@ nsapi_request_context *rc = (nsapi_request_context *)server_context; TSRMLS_FETCH(); - if (!rc) { - return; - } - if (!SG(headers_sent)) { sapi_send_headers(TSRMLS_C); } @@ -969,7 +965,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); @@ -1041,7 +1037,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