File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -564,6 +564,11 @@ package virtual_server;
564564 $test_domain_user .' /public_html/test.php' ,
565565 },
566566
567+ # Enable content negotiation for extensionless PHP requests
568+ { ' command' => ' echo "Options +MultiViews" >~' .
569+ $test_domain_user .' /public_html/.htaccess' ,
570+ },
571+
567572 # Create a test sub-directory
568573 { ' command' => ' su -s /bin/sh ' .$test_domain_user .' -c "mkdir ~/public_html/foo"' ,
569574 },
@@ -665,6 +670,12 @@ package virtual_server;
665670 ' cgi-fcgi' ],
666671 },
667672
673+ # Check PHP running via fCGId through MultiViews
674+ { ' command' => $wget_command .' http://' .$test_domain .' /test' ,
675+ ' grep' => [ ' uid=[0-9]+\\ (' .$test_domain_user .' \\ )' ,
676+ ' cgi-fcgi' ],
677+ },
678+
668679 # Set the PHP version for a sub-directory
669680 { ' command' => ' set-php-directory.pl' ,
670681 ' args' => [ [ ' domain' => $test_domain ],
Original file line number Diff line number Diff line change @@ -412,7 +412,9 @@ sub save_domain_php_mode
412412 if ($mode eq " cgi" ) {
413413 push (@types , " application/x-httpd-php$ver .php" );
414414 }
415- elsif ($mode eq " mod_php" ) {
415+ # Keep a MIME type for MultiViews; execution is still selected by
416+ # the mode-specific handler or wrapper configured above.
417+ elsif ($mode eq " mod_php" || $mode eq " fcgid" ) {
416418 push (@types , " application/x-httpd-php .php" );
417419 }
418420 @types = &unique(@types );
You can’t perform that action at this time.
0 commit comments