1
0
Fork 0

Revert "Set $_SERVER['SCRIPT_NAME'] within proxy command (#11562)" (#11617)

This reverts commit 9c25633d6d.
pull/11620/head
Michael Voříšek 2023-09-03 13:39:48 +02:00 committed by GitHub
parent 98a588eb90
commit 40244dc228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 17 deletions

View File

@ -359,11 +359,6 @@ namespace Composer;
$globalsCode $globalsCode
$streamProxyCode $streamProxyCode
if (__FILE__ === realpath(\$_SERVER['SCRIPT_NAME'])) {
\$_SERVER['SCRIPT_NAME'] = realpath($binPathExported);
}
return include $binPathExported; return include $binPathExported;
PROXY; PROXY;

View File

@ -110,18 +110,6 @@ EOL
<?php declare(strict_types=1); <?php declare(strict_types=1);
echo 'success '.$_SERVER['argv'][1]; echo 'success '.$_SERVER['argv'][1];
EOL
],
'php file which validates $_SERVER["SCRIPT_NAME"]' => [<<<'EOL'
<?php
if (__FILE__ === realpath($_SERVER['SCRIPT_NAME'])) {
echo 'success '.$_SERVER['argv'][1];
} else {
fwrite(STDERR, "Test failure: __FILE__ does not match \$_SERVER['SCRIPT_NAME']\n");
fwrite(STDERR, "\t__FILE__:\t" . __FILE__ . "\n");
fwrite(STDERR, "\t\$_SERVER['SCRIPT_NAME']:\t" . $_SERVER['SCRIPT_NAME'] . "\n");
exit(1);
}
EOL EOL
], ],
]; ];