summaryrefslogtreecommitdiff
path: root/sapi/cli/tests/bug61977.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/cli/tests/bug61977.phpt')
-rw-r--r--sapi/cli/tests/bug61977.phpt5
1 files changed, 2 insertions, 3 deletions
diff --git a/sapi/cli/tests/bug61977.phpt b/sapi/cli/tests/bug61977.phpt
index 1b29dea31b..b55c6a2e8f 100644
--- a/sapi/cli/tests/bug61977.phpt
+++ b/sapi/cli/tests/bug61977.phpt
@@ -17,9 +17,8 @@ $mimetypes = ['html', 'htm', 'svg', 'css', 'js', 'png', 'webm', 'ogv', 'ogg'];
function test_mimetypes($mimetypes) {
foreach ($mimetypes as $mimetype) {
- list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS);
- $port = intval($port) ? : 80;
- $fp = fsockopen($host, $port, $errno, $errstr, 0.5);
+ $host = PHP_CLI_SERVER_HOSTNAME;
+ $fp = php_cli_server_connect();
if (!$fp) die('Connect failed');
file_put_contents(__DIR__ . "/foo.{$mimetype}", '');
$header = <<<HEADER