1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 14:01:01 +02:00
Files
archived-php-src/ext/standard/tests/http/bug75981.phpt
2018-02-26 22:25:51 -08:00

33 lines
600 B
PHP

--TEST--
Bug #75981 (stack-buffer-overflow while parsing HTTP response)
--INI--
allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
<?php
require 'server.inc';
$options = [
'http' => [
'protocol_version' => '1.1',
'header' => 'Connection: Close'
],
];
$ctx = stream_context_create($options);
$responses = [
"data://text/plain,000000000100\xA\xA"
];
$pid = http_server('tcp://127.0.0.1:12342', $responses);
echo @file_get_contents('http://127.0.0.1:12342/', false, $ctx);
http_server_kill($pid);
?>
DONE
--EXPECT--
DONE