sas Sat Oct 26 17:06:10 2002 EDT Modified files: /php4/sapi/thttpd thttpd.c Log: Fix build and .phps support Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.73 php4/sapi/thttpd/thttpd.c:1.74 --- php4/sapi/thttpd/thttpd.c:1.73 Sat Oct 26 16:55:41 2002 +++ php4/sapi/thttpd/thttpd.c Sat Oct 26 17:06:10 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: thttpd.c,v 1.73 2002/10/26 20:55:41 sas Exp $ */ +/* $Id: thttpd.c,v 1.74 2002/10/26 21:06:10 sas Exp $ */ #include "php.h" #include "SAPI.h" @@ -349,7 +349,6 @@ static PHP_MINIT_FUNCTION(thttpd) { - REGISTER_INI_ENTRIES(); return SUCCESS; } @@ -406,20 +405,28 @@ STANDARD_SAPI_MODULE_PROPERTIES }; -static void thttpd_module_main(TSRMLS_D) +static void thttpd_module_main(int show_source TSRMLS_DC) { zend_file_handle file_handle; - file_handle.type = ZEND_HANDLE_FILENAME; - file_handle.filename = SG(request_info).path_translated; - file_handle.free_filename = 0; - file_handle.opened_path = NULL; - if (php_request_startup(TSRMLS_C) == FAILURE) { return; } - php_execute_script(&file_handle TSRMLS_CC); + if (show_source) { + zend_syntax_highlighter_ini syntax_highlighter_ini; + + php_get_highlight_struct(&syntax_highlighter_ini); + highlight_file(SG(request_info).path_translated, +&syntax_highlighter_ini TSRMLS_CC); + } else { + file_handle.type = ZEND_HANDLE_FILENAME; + file_handle.filename = SG(request_info).path_translated; + file_handle.free_filename = 0; + file_handle.opened_path = NULL; + + php_execute_script(&file_handle TSRMLS_CC); + } + php_request_shutdown(NULL); } @@ -648,14 +655,7 @@ thttpd_request_ctor(TSRMLS_C); - if (show_source) { - zend_syntax_highlighter_ini syntax_highlighter_ini; - - php_get_highlight_struct(&syntax_highlighter_ini); - highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC); - } else { - thttpd_module_main(TSRMLS_C); - } + thttpd_module_main(show_source TSRMLS_CC); /* disable kl, if no content-length was seen or Connection: was set */ if (TG(seen_cl) == 0 || TG(seen_cn) == 1) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php