mirror of
https://github.com/php/php-src.git
synced 2026-04-26 09:28:21 +02:00
079905acd5
Not all systems support the discard protocol (TCP port 9), and since there is no particular reason to use it, we switch to using actual server testing.
21 lines
412 B
PHP
21 lines
412 B
PHP
--TEST--
|
|
Bug #46739 (array returned by curl_getinfo should contain content_type key)
|
|
--SKIPIF--
|
|
<?php
|
|
include 'skipif.inc';
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
include 'server.inc';
|
|
$host = curl_cli_server_start();
|
|
$ch = curl_init("{$host}/get.inc");
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
curl_exec($ch);
|
|
$info = curl_getinfo($ch);
|
|
|
|
echo (array_key_exists('content_type', $info)) ? "set" : "not set";
|
|
?>
|
|
--EXPECT--
|
|
set
|