moriyoshi                                Sat, 23 Jul 2011 11:29:26 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=313627

Log:
- Give index.php a precedence over index.html.  Patch by davidc.

Changed paths:
    U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
    U   php/php-src/trunk/sapi/cli/php_cli_server.c

Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c      2011-07-23 
09:27:15 UTC (rev 313626)
+++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c      2011-07-23 
11:29:26 UTC (rev 313627)
@@ -1065,7 +1065,7 @@
 static void php_cli_server_request_translate_vpath(php_cli_server_request 
*request, const char *document_root, size_t document_root_len) /* {{{ */
 {
        struct stat sb;
-       static const char *index_files[] = { "index.html", "index.php", NULL };
+       static const char *index_files[] = { "index.php", "index.html", NULL };
        char *buf = safe_pemalloc(1, request->vpath_len, 1 + document_root_len 
+ 1 + sizeof("index.html"), 1);
        char *p = buf, *prev_patch = 0, *q, *vpath;
        memmove(p, document_root, document_root_len);

Modified: php/php-src/trunk/sapi/cli/php_cli_server.c
===================================================================
--- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-07-23 09:27:15 UTC (rev 
313626)
+++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-07-23 11:29:26 UTC (rev 
313627)
@@ -1065,7 +1065,7 @@
 static void php_cli_server_request_translate_vpath(php_cli_server_request 
*request, const char *document_root, size_t document_root_len) /* {{{ */
 {
        struct stat sb;
-       static const char *index_files[] = { "index.html", "index.php", NULL };
+       static const char *index_files[] = { "index.php", "index.html", NULL };
        char *buf = safe_pemalloc(1, request->vpath_len, 1 + document_root_len 
+ 1 + sizeof("index.html"), 1);
        char *p = buf, *prev_patch = 0, *q, *vpath;
        memmove(p, document_root, document_root_len);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to