1--TEST-- 2$http_reponse_header (header with trailing whitespace) 3--SKIPIF-- 4<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:22349'); ?> 5--INI-- 6allow_url_fopen=1 7--FILE-- 8<?php 9require 'server.inc'; 10 11$responses = array( 12 "data://text/plain,HTTP/1.0 200 Ok\r\nSome: Header \r\n\r\nBody", 13); 14 15$pid = http_server("tcp://127.0.0.1:22349", $responses, $output); 16 17function test() { 18 $f = file_get_contents('http://127.0.0.1:22349/'); 19 var_dump($f); 20 var_dump($http_response_header); 21} 22test(); 23 24http_server_kill($pid); 25?> 26==DONE== 27--EXPECT-- 28string(4) "Body" 29array(2) { 30 [0]=> 31 string(15) "HTTP/1.0 200 Ok" 32 [1]=> 33 string(14) "Some: Header" 34} 35==DONE== 36