]> granicus.if.org Git - php/commitdiff
- Give index.php a precedence over index.html. Patch by davidc.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 23 Jul 2011 11:29:26 +0000 (11:29 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 23 Jul 2011 11:29:26 +0000 (11:29 +0000)
sapi/cli/php_cli_server.c

index b33c8b0eb7a6c1f4b30791e947bcd5ef3133bde6..7b549cea7e1f56324a98f1ce172a6f23cc14f3b0 100644 (file)
@@ -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);