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