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