Skip to content

Commit 60d51db

Browse files
committed
add test
1 parent 582c8ef commit 60d51db

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

ext/standard/tests/http/gh16810.phpt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
Bug #79265 variation: "host:" not at start of header
3+
--INI--
4+
allow_url_fopen=1
5+
--FILE--
6+
<?php
7+
$uri = "http://www.example.com";
8+
$config = [
9+
'http' => [
10+
'timeout' => PHP_INT_MIN,
11+
],
12+
];
13+
$ctx = stream_context_create($config);
14+
var_dump(fopen($uri, "r", false, $ctx));
15+
16+
$config['http']['timeout'] = PHP_INT_MAX;
17+
$ctx = stream_context_create($config);
18+
var_dump(fopen($uri, "r", false, $ctx));
19+
?>
20+
--EXPECTF--
21+
resource(%d) of type (stream)
22+
23+
Warning: fopen(http://www.example.com): Failed to open stream: timeout must be lower than %d in %s on line %d
24+
bool(false)

0 commit comments

Comments
 (0)