003+ array(2) {
004+ ["headers"]=>
005+ array(4) {
006+ [0]=>
007+ string(30) "HTTP/1.0 302 Moved Temporarily"
008+ [1]=>
009+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
010+ [2]=>
011+ string(30) "HTTP/1.0 301 Moved Permanently"
012+ [3]=>
013+ string(41) "Location: http://127.0.0.1:12342/foo/bar3"
014+ }
015+ ["readbuf"]=>
016+ resource(10) of type (stream)
003- array(7) {
004- [0]=>
005- string(30) "HTTP/1.0 302 Moved Temporarily"
006- [1]=>
007- string(41) "Location: http://127.0.0.1:12342/foo/bar2"
008- [2]=>
009- string(30) "HTTP/1.0 301 Moved Permanently"
010- [3]=>
011- string(41) "Location: http://127.0.0.1:12342/foo/bar3"
012- [4]=>
013- string(30) "HTTP/1.0 302 Moved Temporarily"
014- [5]=>
015- string(41) "Location: http://127.0.0.1:12342/foo/bar4"
016- [6]=>
017- string(15) "HTTP/1.0 200 OK"
019+ string(343) "GET /foo/bar HTTP/1.1
020+ User-Agent: PHP/5.4.13
020- string(195) "GET /foo/bar HTTP/1.0
022+ Accept: */*
025+ User-Agent: PHP/5.4.13
027+ Accept: */*
030+ User-Agent: PHP/5.4.13
032+ Accept: */*
034-
035- Warning: fopen(http://127.0.0.1:12342/foo/bar): failed to open stream: Redirection limit reached, aborting in %s
036- bool(false)
037- string(97) "GET /foo/bar HTTP/1.0
035+ User-Agent: PHP/5.4.13
037+ Accept: */*
041+ resource(15) of type (stream)
042+ array(2) {
043+ ["headers"]=>
044+ array(0) {
045+ }
046+ ["readbuf"]=>
047+ resource(16) of type (stream)
048+ }
049+ string(0) ""
050+ string(257) "GET /foo/bar HTTP/1.1
051+ User-Agent: PHP/5.4.13
045-
046- Warning: fopen(http://127.0.0.1:12342/foo/bar): failed to open stream: Redirection limit reached, aborting in %s
047- bool(false)
048- string(48) "GET /foo/bar HTTP/1.0
049- Host: 127.0.0.1:12342
050-
051- "
052- -- Test: fail at first redirection (2) --
053-
054- Warning: fopen(http://127.0.0.1:12342/foo/bar): failed to open stream: Redirection limit reached, aborting in %s
055- bool(false)
056- string(48) "GET /foo/bar HTTP/1.0
057- Host: 127.0.0.1:12342
053+ Accept: */*
056+ User-Agent: PHP/5.4.13
058+ Accept: */*
060+ GET /foo/bar3 HTTP/1.0
061+ User-Agent: PHP/5.4.13
062+ Host: 127.0.0.1:12342
063+ Accept: */*
064+
060- -- Test: return at first redirection --
063- [0]=>
064- string(30) "HTTP/1.0 302 Moved Temporarily"
065- [1]=>
066- string(41) "Location: http://127.0.0.1:12342/foo/bar2"
067+ resource(21) of type (stream)
068+ array(2) {
069+ ["headers"]=>
070+ array(2) {
071+ [0]=>
072+ string(30) "HTTP/1.0 302 Moved Temporarily"
073+ [1]=>
074+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
075+ }
076+ ["readbuf"]=>
077+ resource(22) of type (stream)
078+ }
079+ string(1) "1"
080+ string(85) "GET /foo/bar HTTP/1.1
081+ User-Agent: PHP/5.4.13
082+ Host: 127.0.0.1:12342
083+ Accept: */*
069- string(48) "GET /foo/bar HTTP/1.0
073- -- Test: return at first redirection (2) --
076- [0]=>
077- string(30) "HTTP/1.0 302 Moved Temporarily"
078- [1]=>
079- string(41) "Location: http://127.0.0.1:12342/foo/bar2"
082- string(48) "GET /foo/bar HTTP/1.0
086+ -- Test: fail at first redirection (2) --
086- -- Test: return at second redirection --
088- array(4) {
089- [0]=>
090- string(30) "HTTP/1.0 302 Moved Temporarily"
091- [1]=>
092- string(41) "Location: http://127.0.0.1:12342/foo/bar2"
093- [2]=>
094- string(30) "HTTP/1.0 301 Moved Permanently"
095- [3]=>
096- string(41) "Location: http://127.0.0.1:12342/foo/bar3"
089+ ["headers"]=>
090+ array(0) {
091+ }
092+ ["readbuf"]=>
093+ resource(28) of type (stream)
096+ string(85) "GET /foo/bar HTTP/1.1
097+ User-Agent: PHP/5.4.13
098- string(0) ""
099- string(97) "GET /foo/bar HTTP/1.0
099+ Accept: */*
102+ -- Test: return at first redirection --
102- GET /foo/bar2 HTTP/1.0
103- Host: 127.0.0.1:12342
104-
105+ ["headers"]=>
106+ array(2) {
107+ [0]=>
108+ string(30) "HTTP/1.0 302 Moved Temporarily"
109+ [1]=>
110+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
111+ }
112+ ["readbuf"]=>
113+ resource(34) of type (stream)
116+ string(85) "GET /foo/bar HTTP/1.1
117+ User-Agent: PHP/5.4.13
119+ Accept: */*
122+ -- Test: return at first redirection (2) --
124+ array(2) {
125+ ["headers"]=>
126+ array(0) {
127+ }
128+ ["readbuf"]=>
129+ resource(40) of type (stream)
131+ string(1) "1"
132+ string(85) "GET /foo/bar HTTP/1.1
133+ User-Agent: PHP/5.4.13
135+ Accept: */*
138+ -- Test: return at second redirection --
139+ resource(45) of type (stream)
140+ array(2) {
141+ ["headers"]=>
142+ array(0) {
143+ }
144+ ["readbuf"]=>
145+ resource(46) of type (stream)
146+ }
147+ string(0) ""
148+ string(257) "GET /foo/bar HTTP/1.1
149+ User-Agent: PHP/5.4.13
150+ Host: 127.0.0.1:12342
151+ Accept: */*
152+
153+ GET /foo/bar2 HTTP/1.0
154+ User-Agent: PHP/5.4.13
155+ Host: 127.0.0.1:12342
156+ Accept: */*
157+
158+ GET /foo/bar3 HTTP/1.0
159+ User-Agent: PHP/5.4.13
160+ Host: 127.0.0.1:12342
161+ Accept: */*
162+
163+ "