From: Moriyoshi Koizumi Date: Sat, 23 Jul 2011 11:29:26 +0000 (+0000) Subject: - Give index.php a precedence over index.html. Patch by davidc. X-Git-Tag: php-5.4.0alpha3~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=835523048020030665c7eca3f25dbd916c532e62;p=php - Give index.php a precedence over index.html. Patch by davidc. --- diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index b33c8b0eb7..7b549cea7e 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -1065,7 +1065,7 @@ static void php_cli_server_request_dtor(php_cli_server_request *req) /* {{{ */ 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);