pajoye Mon, 12 Oct 2009 14:40:27 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=289568
Log: - #48779, improve fix, drop usage of _tolower and use zend_strtolower Bug: http://bugs.php.net/48779 (Open) Use of HOST section cause 500 error Changed paths: U php/php-src/branches/PHP_5_3/main/php_ini.c U php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c U php/php-src/trunk/main/php_ini.c U php/php-src/trunk/sapi/cgi/cgi_main.c Modified: php/php-src/branches/PHP_5_3/main/php_ini.c =================================================================== --- php/php-src/branches/PHP_5_3/main/php_ini.c 2009-10-12 14:29:45 UTC (rev 289567) +++ php/php-src/branches/PHP_5_3/main/php_ini.c 2009-10-12 14:40:27 UTC (rev 289568) @@ -47,7 +47,7 @@ char *tmp = path; \ while (*tmp) { \ if (*tmp == '\\') *tmp = '/'; \ - else *tmp = (__isascii(*tmp)) ? _tolower(*tmp) : tolower(*tmp); \ + else *tmp = tolower(*tmp); \ tmp++; \ } \ } Modified: php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c =================================================================== --- php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c 2009-10-12 14:29:45 UTC (rev 289567) +++ php/php-src/branches/PHP_5_3/sapi/cgi/cgi_main.c 2009-10-12 14:40:27 UTC (rev 289568) @@ -820,7 +820,7 @@ path[path_len] = 0; #ifdef PHP_WIN32 /* paths on windows should be case-insensitive */ - strlwr(path); + zend_str_tolower(path, path_len); #endif /* Activate per-dir-system-configuration defined in php.ini and stored into configuration_hash during startup */ @@ -838,7 +838,7 @@ #ifdef PHP_WIN32 /* paths on windows should be case-insensitive */ doc_root = estrndup(doc_root, doc_root_len); - strlwr(doc_root); + zend_str_tolower(doc_root, doc_root_len); #endif php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, doc_root_len - 1 TSRMLS_CC); } Modified: php/php-src/trunk/main/php_ini.c =================================================================== --- php/php-src/trunk/main/php_ini.c 2009-10-12 14:29:45 UTC (rev 289567) +++ php/php-src/trunk/main/php_ini.c 2009-10-12 14:40:27 UTC (rev 289568) @@ -47,7 +47,7 @@ char *tmp = path; \ while (*tmp) { \ if (*tmp == '\\') *tmp = '/'; \ - else *tmp = (__isascii(*tmp)) ? _tolower(*tmp) : tolower(*tmp); \ + else *tmp = tolower(*tmp); \ tmp++; \ } \ } Modified: php/php-src/trunk/sapi/cgi/cgi_main.c =================================================================== --- php/php-src/trunk/sapi/cgi/cgi_main.c 2009-10-12 14:29:45 UTC (rev 289567) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2009-10-12 14:40:27 UTC (rev 289568) @@ -817,7 +817,7 @@ path[path_len] = 0; #ifdef PHP_WIN32 /* paths on windows should be case-insensitive */ - strlwr(path); + zend_str_tolower(path, path_len); #endif /* Activate per-dir-system-configuration defined in php.ini and stored into configuration_hash during startup */ @@ -835,7 +835,7 @@ #ifdef PHP_WIN32 /* paths on windows should be case-insensitive */ doc_root = estrndup(doc_root, doc_root_len); - strlwr(doc_root); + zend_str_tolower(doc_root, doc_root_len); #endif php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, doc_root_len - 1 TSRMLS_CC); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php