2011-11-23 05:45:27 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #54995 (Missing CURLINFO_RESPONSE_CODE support)
|
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
2014-05-12 05:21:57 +00:00
|
|
|
include 'skipif.inc';
|
|
|
|
|
2011-11-23 05:45:27 +00:00
|
|
|
if ($curl_version['version_number'] > 0x070a08) {
|
|
|
|
exit("skip: tests works a versions of curl >= 7.10.8");
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2014-05-12 05:21:57 +00:00
|
|
|
include 'server.inc';
|
|
|
|
$host = curl_cli_server_start();
|
2011-11-23 05:45:27 +00:00
|
|
|
$ch = curl_init();
|
|
|
|
curl_setopt($ch, CURLOPT_URL, "{$host}/get.php");
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
|
|
|
|
|
|
var_dump(curl_getinfo($ch, CURLINFO_HTTP_CODE) == curl_getinfo($ch, CURLINFO_RESPONSE_CODE));
|
|
|
|
|
|
|
|
curl_exec($ch);
|
|
|
|
curl_close($ch);
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
bool(true)
|