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(339) "GET /foo/bar HTTP/1.1
020+ User-Agent: PHP/5.4.8
020- string(195) "GET /foo/bar HTTP/1.0
022+ Accept: */*
025+ User-Agent: PHP/5.4.8
027+ Accept: */*
030+ User-Agent: PHP/5.4.8
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
038- Host: 127.0.0.1:12342
039-
040- GET /foo/bar2 HTTP/1.0
041- Host: 127.0.0.1:12342
042-
043- "
044- -- Test: fail at first redirection --
035+ User-Agent: PHP/5.4.8
037+ Accept: */*
041+ resource(15) of type (stream)
042+ array(2) {
043+ ["headers"]=>
044+ array(4) {
045+ [0]=>
046+ string(30) "HTTP/1.0 302 Moved Temporarily"
047+ [1]=>
048+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
049+ [2]=>
050+ string(30) "HTTP/1.0 301 Moved Permanently"
051+ [3]=>
052+ string(41) "Location: http://127.0.0.1:12342/foo/bar3"
053+ }
054+ ["readbuf"]=>
055+ resource(16) of type (stream)
056+ }
057+ string(0) ""
058+ string(254) "GET /foo/bar HTTP/1.1
059+ User-Agent: PHP/5.4.8
060+ Host: 127.0.0.1:12342
061+ Accept: */*
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
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
060- -- Test: return at first redirection --
063+ GET /foo/bar2 HTTP/1.0
064+ User-Agent: PHP/5.4.8
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"
066+ Accept: */*
068+ GET /foo/bar3 HTTP/1.0
069+ User-Agent: PHP/5.4.8
070+ Host: 127.0.0.1:12342
071+ Accept: */*
072+
069- string(48) "GET /foo/bar HTTP/1.0
073- -- Test: return at first redirection (2) --
074+ -- Test: fail at first redirection --
075+ resource(21) of type (stream)
076+ array(2) {
077+ ["headers"]=>
078+ array(0) {
079+ }
080+ ["readbuf"]=>
081+ resource(22) of type (stream)
082+ }
083+ string(1) "1"
084+ string(84) "GET /foo/bar HTTP/1.1
085+ User-Agent: PHP/5.4.8
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: return at second redirection --
087+ Accept: */*
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"
090+ -- Test: fail at first redirection (2) --
093+ ["headers"]=>
094+ array(2) {
095+ [0]=>
096+ string(30) "HTTP/1.0 302 Moved Temporarily"
097+ [1]=>
098+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
099+ }
100+ ["readbuf"]=>
101+ resource(28) of type (stream)
098- string(0) ""
099- string(97) "GET /foo/bar HTTP/1.0
102- GET /foo/bar2 HTTP/1.0
103- Host: 127.0.0.1:12342
104-
104+ string(84) "GET /foo/bar HTTP/1.1
105+ User-Agent: PHP/5.4.8
107+ Accept: */*
110+ -- Test: return at first redirection --
113+ ["headers"]=>
114+ array(0) {
115+ }
116+ ["readbuf"]=>
117+ resource(34) of type (stream)
120+ string(84) "GET /foo/bar HTTP/1.1
121+ User-Agent: PHP/5.4.8
123+ Accept: */*
126+ -- Test: return at first redirection (2) --
128+ array(2) {
129+ ["headers"]=>
130+ array(0) {
131+ }
132+ ["readbuf"]=>
133+ resource(40) of type (stream)
135+ string(1) "1"
136+ string(84) "GET /foo/bar HTTP/1.1
137+ User-Agent: PHP/5.4.8
139+ Accept: */*
142+ -- Test: return at second redirection --
143+ resource(45) of type (stream)
144+ array(2) {
145+ ["headers"]=>
146+ array(4) {
147+ [0]=>
148+ string(30) "HTTP/1.0 302 Moved Temporarily"
149+ [1]=>
150+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
151+ [2]=>
152+ string(30) "HTTP/1.0 301 Moved Permanently"
153+ [3]=>
154+ string(41) "Location: http://127.0.0.1:12342/foo/bar3"
155+ }
156+ ["readbuf"]=>
157+ resource(46) of type (stream)
158+ }
159+ string(0) ""
160+ string(254) "GET /foo/bar HTTP/1.1
161+ User-Agent: PHP/5.4.8
162+ Host: 127.0.0.1:12342
163+ Accept: */*
164+
165+ GET /foo/bar2 HTTP/1.0
166+ User-Agent: PHP/5.4.8
167+ Host: 127.0.0.1:12342
168+ Accept: */*
169+
170+ GET /foo/bar3 HTTP/1.0
171+ User-Agent: PHP/5.4.8
172+ Host: 127.0.0.1:12342
173+ Accept: */*
174+
175+ "