Test: /ext/standard/tests/http/bug38802.phpt - Version 5.4.0        

Bug #38802 'max_redirects' context options doesn't work when value is 1
Submitted: 2006-09-13 07:36:04 Modified: 2010-02-17 00:35:40
From: datibbaw Assigned:
Status: Closed Package: HTTP related
PHP Version: 5.2.9 OS: Linux Gentoo

There are 14 different diffs reported by users for this test.

Count Diff
124 (68%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(5) "done."
011+ string(339) "GET /foo/bar HTTP/1.1
012+ User-Agent: PHP/5.4.0
013+ Host: 127.0.0.1:12342
014+ Accept: */*
015+
016+ GET /foo/bar2 HTTP/1.0
017+ User-Agent: PHP/5.4.0
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"
018- }
019- string(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
019+ Accept: */*
021+ GET /foo/bar3 HTTP/1.0
022+ User-Agent: PHP/5.4.0
023- GET /foo/bar2 HTTP/1.0
024+ Accept: */*
026+ GET /foo/bar4 HTTP/1.0
027+ User-Agent: PHP/5.4.0
026- GET /foo/bar3 HTTP/1.0
029+ Accept: */*
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
033+ resource(15) of type (stream)
034+ array(2) {
035+ ["headers"]=>
036+ array(0) {
037+ }
038+ ["readbuf"]=>
039+ resource(16) of type (stream)
040+ }
041+ string(0) ""
042+ string(254) "GET /foo/bar HTTP/1.1
043+ User-Agent: PHP/5.4.0
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
045+ Accept: */*
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
048+ User-Agent: PHP/5.4.0
050+ Accept: */*
052+ GET /foo/bar3 HTTP/1.0
053+ User-Agent: PHP/5.4.0
054+ Host: 127.0.0.1:12342
055+ Accept: */*
056+
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
059+ resource(21) of type (stream)
060+ array(2) {
061+ ["headers"]=>
062+ array(0) {
063+ }
064+ ["readbuf"]=>
065+ resource(22) of type (stream)
066+ }
067+ string(1) "1"
068+ string(84) "GET /foo/bar HTTP/1.1
069+ User-Agent: PHP/5.4.0
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"
069- string(48) "GET /foo/bar HTTP/1.0
071+ Accept: */*
075+ resource(27) of type (stream)
076+ array(2) {
077+ ["headers"]=>
078+ array(0) {
079+ }
080+ ["readbuf"]=>
081+ resource(28) of type (stream)
082+ }
083+ string(1) "1"
084+ string(84) "GET /foo/bar HTTP/1.1
085+ User-Agent: PHP/5.4.0
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
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"
093+ ["headers"]=>
094+ array(0) {
095+ }
096+ ["readbuf"]=>
097+ resource(34) of type (stream)
099- string(97) "GET /foo/bar HTTP/1.0
100+ string(84) "GET /foo/bar HTTP/1.1
101+ User-Agent: PHP/5.4.0
103+ Accept: */*
109+ ["headers"]=>
110+ array(0) {
111+ }
112+ ["readbuf"]=>
113+ resource(40) of type (stream)
116+ string(84) "GET /foo/bar HTTP/1.1
117+ User-Agent: PHP/5.4.0
119+ Accept: */*
124+ array(2) {
125+ ["headers"]=>
126+ array(0) {
127+ }
128+ ["readbuf"]=>
129+ resource(46) of type (stream)
132+ string(254) "GET /foo/bar HTTP/1.1
133+ User-Agent: PHP/5.4.0
135+ Accept: */*
138+ User-Agent: PHP/5.4.0
140+ Accept: */*
142+ GET /foo/bar3 HTTP/1.0
143+ User-Agent: PHP/5.4.0
144+ Host: 127.0.0.1:12342
145+ Accept: */*
146+
47 (26%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(5) "done."
011+ string(339) "GET /foo/bar HTTP/1.1
012+ User-Agent: PHP/5.4.0
013+ Host: 127.0.0.1:12342
014+ Accept: */*
015+
016+ GET /foo/bar2 HTTP/1.1
017+ User-Agent: PHP/5.4.0
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"
018- }
019- string(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
019+ Accept: */*
021+ GET /foo/bar3 HTTP/1.1
022+ User-Agent: PHP/5.4.0
023- GET /foo/bar2 HTTP/1.0
024+ Accept: */*
026+ GET /foo/bar4 HTTP/1.1
027+ User-Agent: PHP/5.4.0
026- GET /foo/bar3 HTTP/1.0
029+ Accept: */*
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
033+ resource(15) of type (stream)
034+ array(2) {
035+ ["headers"]=>
036+ array(0) {
037+ }
038+ ["readbuf"]=>
039+ resource(16) of type (stream)
040+ }
041+ string(0) ""
042+ string(254) "GET /foo/bar HTTP/1.1
043+ User-Agent: PHP/5.4.0
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
040- GET /foo/bar2 HTTP/1.0
045+ Accept: */*
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
047+ GET /foo/bar2 HTTP/1.1
048+ User-Agent: PHP/5.4.0
050+ Accept: */*
052+ GET /foo/bar3 HTTP/1.1
053+ User-Agent: PHP/5.4.0
054+ Host: 127.0.0.1:12342
055+ Accept: */*
056+
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
059+ resource(21) of type (stream)
060+ array(2) {
061+ ["headers"]=>
062+ array(0) {
063+ }
064+ ["readbuf"]=>
065+ resource(22) of type (stream)
066+ }
067+ string(1) "1"
068+ string(84) "GET /foo/bar HTTP/1.1
069+ User-Agent: PHP/5.4.0
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"
069- string(48) "GET /foo/bar HTTP/1.0
071+ Accept: */*
075+ resource(27) of type (stream)
076+ array(2) {
077+ ["headers"]=>
078+ array(0) {
079+ }
080+ ["readbuf"]=>
081+ resource(28) of type (stream)
082+ }
083+ string(1) "1"
084+ string(84) "GET /foo/bar HTTP/1.1
085+ User-Agent: PHP/5.4.0
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
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"
093+ ["headers"]=>
094+ array(0) {
095+ }
096+ ["readbuf"]=>
097+ resource(34) of type (stream)
099- string(97) "GET /foo/bar HTTP/1.0
100+ string(84) "GET /foo/bar HTTP/1.1
101+ User-Agent: PHP/5.4.0
102- GET /foo/bar2 HTTP/1.0
103+ Accept: */*
109+ ["headers"]=>
110+ array(0) {
111+ }
112+ ["readbuf"]=>
113+ resource(40) of type (stream)
116+ string(84) "GET /foo/bar HTTP/1.1
117+ User-Agent: PHP/5.4.0
119+ Accept: */*
124+ array(2) {
125+ ["headers"]=>
126+ array(0) {
127+ }
128+ ["readbuf"]=>
129+ resource(46) of type (stream)
132+ string(254) "GET /foo/bar HTTP/1.1
133+ User-Agent: PHP/5.4.0
135+ Accept: */*
137+ GET /foo/bar2 HTTP/1.1
138+ User-Agent: PHP/5.4.0
140+ Accept: */*
142+ GET /foo/bar3 HTTP/1.1
143+ User-Agent: PHP/5.4.0
144+ Host: 127.0.0.1:12342
145+ Accept: */*
146+
1 (1%)
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.0
020- string(195) "GET /foo/bar HTTP/1.0
022+ Accept: */*
025+ User-Agent: PHP/5.4.0
027+ Accept: */*
030+ User-Agent: PHP/5.4.0
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.0
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.0
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
057- Host: 127.0.0.1:12342
058-
059- "
060- -- Test: return at first redirection --
061- resource(%d) of type (stream)
062- array(2) {
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"
063+ GET /foo/bar2 HTTP/1.0
064+ User-Agent: PHP/5.4.0
066+ Accept: */*
068+ GET /foo/bar3 HTTP/1.0
069+ User-Agent: PHP/5.4.0
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(2) {
079+ [0]=>
080+ string(30) "HTTP/1.0 302 Moved Temporarily"
081+ [1]=>
082+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
083+ }
084+ ["readbuf"]=>
085+ resource(22) of type (stream)
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 --
088+ string(84) "GET /foo/bar HTTP/1.1
089+ User-Agent: PHP/5.4.0
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"
091+ Accept: */*
094+ -- Test: fail at first redirection (2) --
097+ ["headers"]=>
098+ array(0) {
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.0
107+ Accept: */*
110+ -- Test: return at first redirection --
112+ array(2) {
113+ ["headers"]=>
114+ array(0) {
115+ }
116+ ["readbuf"]=>
117+ resource(34) of type (stream)
119+ string(1) "1"
120+ string(84) "GET /foo/bar HTTP/1.1
121+ User-Agent: PHP/5.4.0
123+ Accept: */*
126+ -- Test: return at first redirection (2) --
127+ resource(39) of type (stream)
128+ array(2) {
129+ ["headers"]=>
130+ array(0) {
131+ }
132+ ["readbuf"]=>
133+ resource(40) of type (stream)
134+ }
135+ string(1) "1"
136+ string(84) "GET /foo/bar HTTP/1.1
137+ User-Agent: PHP/5.4.0
138+ Host: 127.0.0.1:12342
139+ Accept: */*
140+
141+ "
142+ -- Test: return at second redirection --
143+ resource(45) of type (stream)
144+ array(2) {
145+ ["headers"]=>
146+ array(0) {
147+ }
148+ ["readbuf"]=>
149+ resource(46) of type (stream)
150+ }
151+ string(0) ""
152+ string(254) "GET /foo/bar HTTP/1.1
153+ User-Agent: PHP/5.4.0
154+ Host: 127.0.0.1:12342
155+ Accept: */*
156+
157+ GET /foo/bar2 HTTP/1.0
158+ User-Agent: PHP/5.4.0
159+ Host: 127.0.0.1:12342
160+ Accept: */*
161+
162+ GET /foo/bar3 HTTP/1.0
163+ User-Agent: PHP/5.4.0
164+ Host: 127.0.0.1:12342
165+ Accept: */*
166+
167+ "
1 (1%)
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.0
020- string(195) "GET /foo/bar HTTP/1.0
022+ Accept: */*
025+ User-Agent: PHP/5.4.0
027+ Accept: */*
030+ User-Agent: PHP/5.4.0
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.0
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(254) "GET /foo/bar HTTP/1.1
051+ User-Agent: PHP/5.4.0
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
053+ Accept: */*
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
056+ User-Agent: PHP/5.4.0
058+ Accept: */*
060+ GET /foo/bar3 HTTP/1.0
061+ User-Agent: PHP/5.4.0
062+ Host: 127.0.0.1:12342
063+ Accept: */*
064+
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(0) {
071+ }
072+ ["readbuf"]=>
073+ resource(22) of type (stream)
074+ }
075+ string(1) "1"
076+ string(84) "GET /foo/bar HTTP/1.1
077+ User-Agent: PHP/5.4.0
069- string(48) "GET /foo/bar HTTP/1.0
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"
079+ Accept: */*
082- string(48) "GET /foo/bar HTTP/1.0
083+ resource(27) of type (stream)
084+ array(2) {
085+ ["headers"]=>
086+ array(0) {
087+ }
088+ ["readbuf"]=>
089+ resource(28) of type (stream)
090+ }
091+ string(1) "1"
092+ string(84) "GET /foo/bar HTTP/1.1
093+ User-Agent: PHP/5.4.0
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"
095+ Accept: */*
099- string(97) "GET /foo/bar HTTP/1.0
101+ ["headers"]=>
102+ array(0) {
103+ }
104+ ["readbuf"]=>
105+ resource(34) of type (stream)
108+ string(84) "GET /foo/bar HTTP/1.1
109+ User-Agent: PHP/5.4.0
111+ Accept: */*
117+ ["headers"]=>
118+ array(0) {
119+ }
120+ ["readbuf"]=>
121+ resource(40) of type (stream)
124+ string(84) "GET /foo/bar HTTP/1.1
125+ User-Agent: PHP/5.4.0
127+ Accept: */*
132+ array(2) {
133+ ["headers"]=>
134+ array(0) {
135+ }
136+ ["readbuf"]=>
137+ resource(46) of type (stream)
140+ string(254) "GET /foo/bar HTTP/1.1
141+ User-Agent: PHP/5.4.0
143+ Accept: */*
146+ User-Agent: PHP/5.4.0
148+ Accept: */*
150+ GET /foo/bar3 HTTP/1.0
151+ User-Agent: PHP/5.4.0
152+ Host: 127.0.0.1:12342
153+ Accept: */*
154+
1 (1%)
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.0
020- string(195) "GET /foo/bar HTTP/1.0
022+ Accept: */*
023- GET /foo/bar2 HTTP/1.0
024+ GET /foo/bar2 HTTP/1.1
025+ User-Agent: PHP/5.4.0
026- GET /foo/bar3 HTTP/1.0
027+ Accept: */*
029+ GET /foo/bar3 HTTP/1.1
030+ User-Agent: PHP/5.4.0
029- GET /foo/bar4 HTTP/1.0
032+ Accept: */*
034+ GET /foo/bar4 HTTP/1.1
035+ User-Agent: PHP/5.4.0
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 --
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.0
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.1
064+ User-Agent: PHP/5.4.0
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.1
069+ User-Agent: PHP/5.4.0
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.0
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(0) {
095+ }
096+ ["readbuf"]=>
097+ resource(28) of type (stream)
098- string(0) ""
099- string(97) "GET /foo/bar HTTP/1.0
100+ string(84) "GET /foo/bar HTTP/1.1
101+ User-Agent: PHP/5.4.0
102- GET /foo/bar2 HTTP/1.0
103- Host: 127.0.0.1:12342
104-
103+ Accept: */*
106+ -- Test: return at first redirection --
109+ ["headers"]=>
110+ array(2) {
111+ [0]=>
112+ string(30) "HTTP/1.0 302 Moved Temporarily"
113+ [1]=>
114+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
115+ }
116+ ["readbuf"]=>
117+ resource(34) of type (stream)
120+ string(84) "GET /foo/bar HTTP/1.1
121+ User-Agent: PHP/5.4.0
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.0
139+ Accept: */*
142+ -- Test: return at second redirection --
143+ resource(45) of type (stream)
144+ array(2) {
145+ ["headers"]=>
146+ array(0) {
147+ }
148+ ["readbuf"]=>
149+ resource(46) of type (stream)
150+ }
151+ string(0) ""
152+ string(254) "GET /foo/bar HTTP/1.1
153+ User-Agent: PHP/5.4.0
154+ Host: 127.0.0.1:12342
155+ Accept: */*
156+
157+ GET /foo/bar2 HTTP/1.1
158+ User-Agent: PHP/5.4.0
159+ Host: 127.0.0.1:12342
160+ Accept: */*
161+
162+ GET /foo/bar3 HTTP/1.1
163+ User-Agent: PHP/5.4.0
164+ Host: 127.0.0.1:12342
165+ Accept: */*
166+
167+ "
1 (1%)
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.0
020- string(195) "GET /foo/bar HTTP/1.0
022+ Accept: */*
023- GET /foo/bar2 HTTP/1.0
024+ GET /foo/bar2 HTTP/1.1
025+ User-Agent: PHP/5.4.0
026- GET /foo/bar3 HTTP/1.0
027+ Accept: */*
029+ GET /foo/bar3 HTTP/1.1
030+ User-Agent: PHP/5.4.0
029- GET /foo/bar4 HTTP/1.0
032+ Accept: */*
034+ GET /foo/bar4 HTTP/1.1
035+ User-Agent: PHP/5.4.0
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
037+ Accept: */*
040- GET /foo/bar2 HTTP/1.0
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(254) "GET /foo/bar HTTP/1.1
051+ User-Agent: PHP/5.4.0
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: */*
055+ GET /foo/bar2 HTTP/1.1
056+ User-Agent: PHP/5.4.0
058+ Accept: */*
060+ GET /foo/bar3 HTTP/1.1
061+ User-Agent: PHP/5.4.0
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(84) "GET /foo/bar HTTP/1.1
081+ User-Agent: PHP/5.4.0
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(84) "GET /foo/bar HTTP/1.1
097+ User-Agent: PHP/5.4.0
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(0) {
107+ }
108+ ["readbuf"]=>
109+ resource(34) of type (stream)
112+ string(84) "GET /foo/bar HTTP/1.1
113+ User-Agent: PHP/5.4.0
115+ Accept: */*
118+ -- Test: return at first redirection (2) --
120+ array(2) {
121+ ["headers"]=>
122+ array(0) {
123+ }
124+ ["readbuf"]=>
125+ resource(40) of type (stream)
127+ string(1) "1"
128+ string(84) "GET /foo/bar HTTP/1.1
129+ User-Agent: PHP/5.4.0
131+ Accept: */*
134+ -- Test: return at second redirection --
135+ resource(45) of type (stream)
136+ array(2) {
137+ ["headers"]=>
138+ array(0) {
139+ }
140+ ["readbuf"]=>
141+ resource(46) of type (stream)
142+ }
143+ string(0) ""
144+ string(254) "GET /foo/bar HTTP/1.1
145+ User-Agent: PHP/5.4.0
146+ Host: 127.0.0.1:12342
147+ Accept: */*
148+
149+ GET /foo/bar2 HTTP/1.1
150+ User-Agent: PHP/5.4.0
151+ Host: 127.0.0.1:12342
152+ Accept: */*
153+
154+ GET /foo/bar3 HTTP/1.1
155+ User-Agent: PHP/5.4.0
156+ Host: 127.0.0.1:12342
157+ Accept: */*
158+
159+ "
1 (1%)
003+ array(2) {
004+ ["headers"]=>
005+ array(2) {
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+ }
011+ ["readbuf"]=>
012+ 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"
015+ string(339) "GET /foo/bar HTTP/1.1
016+ User-Agent: PHP/5.4.0
018+ Accept: */*
020- string(195) "GET /foo/bar HTTP/1.0
021+ User-Agent: PHP/5.4.0
023+ Accept: */*
026+ User-Agent: PHP/5.4.0
028+ Accept: */*
031+ User-Agent: PHP/5.4.0
033+ 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
037+ resource(15) of type (stream)
038+ array(2) {
039+ ["headers"]=>
040+ array(0) {
041+ }
042+ ["readbuf"]=>
043+ resource(16) of type (stream)
044+ }
045+ string(0) ""
046+ string(254) "GET /foo/bar HTTP/1.1
047+ User-Agent: PHP/5.4.0
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+ Accept: */*
052+ User-Agent: PHP/5.4.0
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
054+ Accept: */*
056+ GET /foo/bar3 HTTP/1.0
057+ User-Agent: PHP/5.4.0
058+ Host: 127.0.0.1:12342
059+ Accept: */*
060+
063+ resource(21) of type (stream)
064+ array(2) {
065+ ["headers"]=>
066+ array(0) {
067+ }
068+ ["readbuf"]=>
069+ resource(22) of type (stream)
070+ }
071+ string(1) "1"
072+ string(84) "GET /foo/bar HTTP/1.1
073+ User-Agent: PHP/5.4.0
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"
069- string(48) "GET /foo/bar HTTP/1.0
075+ Accept: */*
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"
079+ resource(27) of type (stream)
080+ array(2) {
081+ ["headers"]=>
082+ array(0) {
083+ }
084+ ["readbuf"]=>
085+ resource(28) of type (stream)
086+ }
087+ string(1) "1"
088+ string(84) "GET /foo/bar HTTP/1.1
089+ User-Agent: PHP/5.4.0
082- string(48) "GET /foo/bar HTTP/1.0
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"
091+ Accept: */*
097+ ["headers"]=>
098+ array(0) {
099+ }
100+ ["readbuf"]=>
101+ resource(34) of type (stream)
099- string(97) "GET /foo/bar HTTP/1.0
104+ string(84) "GET /foo/bar HTTP/1.1
105+ User-Agent: PHP/5.4.0
107+ Accept: */*
113+ ["headers"]=>
114+ array(0) {
115+ }
116+ ["readbuf"]=>
117+ resource(40) of type (stream)
120+ string(84) "GET /foo/bar HTTP/1.1
121+ User-Agent: PHP/5.4.0
123+ Accept: */*
128+ array(2) {
129+ ["headers"]=>
130+ array(0) {
131+ }
132+ ["readbuf"]=>
133+ resource(46) of type (stream)
136+ string(254) "GET /foo/bar HTTP/1.1
137+ User-Agent: PHP/5.4.0
139+ Accept: */*
142+ User-Agent: PHP/5.4.0
144+ Accept: */*
146+ GET /foo/bar3 HTTP/1.0
147+ User-Agent: PHP/5.4.0
148+ Host: 127.0.0.1:12342
149+ Accept: */*
150+
1 (1%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(5) "done."
011+ string(411) "GET /foo/bar HTTP/1.1
012+ User-Agent: PHP/5.4.0
013+ Host: 127.0.0.1:12342
014+ Pragma: no-cache
015+ Accept: */*
016+
017+ GET /foo/bar2 HTTP/1.1
018+ User-Agent: PHP/5.4.0
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"
018- }
019- string(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
020+ Pragma: no-cache
021+ Accept: */*
023+ GET /foo/bar3 HTTP/1.1
024+ User-Agent: PHP/5.4.0
023- GET /foo/bar2 HTTP/1.0
026+ Pragma: no-cache
027+ Accept: */*
026- GET /foo/bar3 HTTP/1.0
029+ GET /foo/bar4 HTTP/1.1
030+ User-Agent: PHP/5.4.0
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
032+ Pragma: no-cache
033+ 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
037+ resource(15) of type (stream)
038+ array(2) {
039+ ["headers"]=>
040+ array(0) {
041+ }
042+ ["readbuf"]=>
043+ resource(16) of type (stream)
044+ }
045+ string(0) ""
046+ string(308) "GET /foo/bar HTTP/1.1
047+ User-Agent: PHP/5.4.0
040- GET /foo/bar2 HTTP/1.0
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+ Pragma: no-cache
050+ Accept: */*
052+ GET /foo/bar2 HTTP/1.1
053+ User-Agent: PHP/5.4.0
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
055+ Pragma: no-cache
056+ Accept: */*
058+ GET /foo/bar3 HTTP/1.1
059+ User-Agent: PHP/5.4.0
060+ Host: 127.0.0.1:12342
061+ Pragma: no-cache
062+ Accept: */*
063+
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+ resource(21) of type (stream)
067+ array(2) {
068+ ["headers"]=>
069+ array(0) {
070+ }
071+ ["readbuf"]=>
072+ resource(22) of type (stream)
073+ }
074+ string(1) "1"
075+ string(102) "GET /foo/bar HTTP/1.1
076+ User-Agent: PHP/5.4.0
069- string(48) "GET /foo/bar HTTP/1.0
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"
078+ Pragma: no-cache
079+ Accept: */*
082- string(48) "GET /foo/bar HTTP/1.0
083+ resource(27) of type (stream)
084+ array(2) {
085+ ["headers"]=>
086+ array(0) {
087+ }
088+ ["readbuf"]=>
089+ resource(28) of type (stream)
090+ }
091+ string(1) "1"
092+ string(102) "GET /foo/bar HTTP/1.1
093+ User-Agent: PHP/5.4.0
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"
095+ Pragma: no-cache
096+ Accept: */*
099- string(97) "GET /foo/bar HTTP/1.0
102+ ["headers"]=>
103+ array(0) {
104+ }
105+ ["readbuf"]=>
106+ resource(34) of type (stream)
102- GET /foo/bar2 HTTP/1.0
109+ string(102) "GET /foo/bar HTTP/1.1
110+ User-Agent: PHP/5.4.0
112+ Pragma: no-cache
113+ Accept: */*
119+ ["headers"]=>
120+ array(0) {
121+ }
122+ ["readbuf"]=>
123+ resource(40) of type (stream)
126+ string(102) "GET /foo/bar HTTP/1.1
127+ User-Agent: PHP/5.4.0
129+ Pragma: no-cache
130+ Accept: */*
135+ array(2) {
136+ ["headers"]=>
137+ array(0) {
138+ }
139+ ["readbuf"]=>
140+ resource(46) of type (stream)
143+ string(308) "GET /foo/bar HTTP/1.1
144+ User-Agent: PHP/5.4.0
146+ Pragma: no-cache
147+ Accept: */*
149+ GET /foo/bar2 HTTP/1.1
150+ User-Agent: PHP/5.4.0
152+ Pragma: no-cache
153+ Accept: */*
155+ GET /foo/bar3 HTTP/1.1
156+ User-Agent: PHP/5.4.0
157+ Host: 127.0.0.1:12342
158+ Pragma: no-cache
159+ Accept: */*
160+
1 (1%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(5) "done."
011+ string(339) "GET /foo/bar HTTP/1.1
012+ User-Agent: PHP/5.4.0
013+ Host: 127.0.0.1:12342
014+ Accept: */*
015+
016+ GET /foo/bar2 HTTP/1.0
017+ User-Agent: PHP/5.4.0
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"
018- }
019- string(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
019+ Accept: */*
021+ GET /foo/bar3 HTTP/1.0
022+ User-Agent: PHP/5.4.0
023- GET /foo/bar2 HTTP/1.0
024+ Accept: */*
026+ GET /foo/bar4 HTTP/1.0
027+ User-Agent: PHP/5.4.0
026- GET /foo/bar3 HTTP/1.0
029+ Accept: */*
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
033+ resource(15) of type (stream)
034+ array(2) {
035+ ["headers"]=>
036+ array(2) {
037+ [0]=>
038+ string(30) "HTTP/1.0 302 Moved Temporarily"
039+ [1]=>
040+ string(41) "Location: http://127.0.0.1:12342/foo/bar2"
041+ }
042+ ["readbuf"]=>
043+ resource(16) of type (stream)
044+ }
045+ string(0) ""
046+ string(254) "GET /foo/bar HTTP/1.1
047+ User-Agent: PHP/5.4.0
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
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+ Accept: */*
051+ GET /foo/bar2 HTTP/1.0
052+ User-Agent: PHP/5.4.0
053+ Host: 127.0.0.1:12342
054+ Accept: */*
055+
056+ GET /foo/bar3 HTTP/1.0
057+ User-Agent: PHP/5.4.0
058+ Host: 127.0.0.1:12342
059+ Accept: */*
060+
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
063+ resource(21) of type (stream)
064+ array(2) {
065+ ["headers"]=>
066+ array(0) {
067+ }
068+ ["readbuf"]=>
069+ resource(22) of type (stream)
070+ }
071+ string(1) "1"
072+ string(84) "GET /foo/bar HTTP/1.1
073+ User-Agent: PHP/5.4.0
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"
069- string(48) "GET /foo/bar HTTP/1.0
075+ Accept: */*
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"
079+ resource(27) of type (stream)
080+ array(2) {
081+ ["headers"]=>
082+ array(0) {
083+ }
084+ ["readbuf"]=>
085+ resource(28) of type (stream)
086+ }
087+ string(1) "1"
088+ string(84) "GET /foo/bar HTTP/1.1
089+ User-Agent: PHP/5.4.0
082- string(48) "GET /foo/bar HTTP/1.0
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"
091+ Accept: */*
097+ ["headers"]=>
098+ array(0) {
099+ }
100+ ["readbuf"]=>
101+ resource(34) of type (stream)
099- string(97) "GET /foo/bar HTTP/1.0
104+ string(84) "GET /foo/bar HTTP/1.1
105+ User-Agent: PHP/5.4.0
107+ Accept: */*
113+ ["headers"]=>
114+ array(0) {
115+ }
116+ ["readbuf"]=>
117+ resource(40) of type (stream)
120+ string(84) "GET /foo/bar HTTP/1.1
121+ User-Agent: PHP/5.4.0
123+ Accept: */*
128+ array(2) {
129+ ["headers"]=>
130+ array(0) {
131+ }
132+ ["readbuf"]=>
133+ resource(46) of type (stream)
136+ string(254) "GET /foo/bar HTTP/1.1
137+ User-Agent: PHP/5.4.0
139+ Accept: */*
142+ User-Agent: PHP/5.4.0
144+ Accept: */*
146+ GET /foo/bar3 HTTP/1.0
147+ User-Agent: PHP/5.4.0
148+ Host: 127.0.0.1:12342
149+ Accept: */*
150+
1 (1%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(5) "done."
011+ string(339) "GET /foo/bar HTTP/1.1
012+ User-Agent: PHP/5.4.0
013+ Host: 127.0.0.1:12342
014+ Accept: */*
015+
016+ GET /foo/bar2 HTTP/1.0
017+ User-Agent: PHP/5.4.0
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"
018- }
019- string(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
019+ Accept: */*
021+ GET /foo/bar3 HTTP/1.0
022+ User-Agent: PHP/5.4.0
023- GET /foo/bar2 HTTP/1.0
024+ Accept: */*
026+ GET /foo/bar4 HTTP/1.0
027+ User-Agent: PHP/5.4.0
026- GET /foo/bar3 HTTP/1.0
029+ Accept: */*
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
033+ resource(15) of type (stream)
034+ array(2) {
035+ ["headers"]=>
036+ array(0) {
037+ }
038+ ["readbuf"]=>
039+ resource(16) of type (stream)
040+ }
041+ string(0) ""
042+ string(0) ""
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+ resource(21) of type (stream)
045+ array(2) {
046+ ["headers"]=>
047+ array(0) {
048+ }
049+ ["readbuf"]=>
050+ resource(22) of type (stream)
051+ }
052+ string(1) "1"
053+ string(84) "GET /foo/bar HTTP/1.1
054+ User-Agent: PHP/5.4.0
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
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
058-
059- "
056+ Accept: */*
060+ resource(27) of type (stream)
061+ array(2) {
062+ ["headers"]=>
063+ array(0) {
064+ }
065+ ["readbuf"]=>
066+ resource(28) of type (stream)
067+ }
068+ string(0) ""
069+ string(0) ""
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"
069- string(48) "GET /foo/bar HTTP/1.0
073+ ["headers"]=>
074+ array(0) {
075+ }
076+ ["readbuf"]=>
077+ resource(34) of type (stream)
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"
080+ string(84) "GET /foo/bar HTTP/1.1
081+ User-Agent: PHP/5.4.0
081- string(1) "1"
082- string(48) "GET /foo/bar HTTP/1.0
083- Host: 127.0.0.1:12342
084-
085- "
083+ 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"
089+ ["headers"]=>
090+ array(0) {
091+ }
092+ ["readbuf"]=>
093+ resource(40) of type (stream)
095+ string(0) ""
096+ string(0) ""
099+ array(2) {
100+ ["headers"]=>
101+ array(0) {
102+ }
103+ ["readbuf"]=>
104+ resource(46) of type (stream)
099- string(97) "GET /foo/bar HTTP/1.0
107+ string(254) "GET /foo/bar HTTP/1.1
108+ User-Agent: PHP/5.4.0
110+ Accept: */*
113+ User-Agent: PHP/5.4.0
115+ Accept: */*
117+ GET /foo/bar3 HTTP/1.0
118+ User-Agent: PHP/5.4.0
119+ Host: 127.0.0.1:12342
120+ Accept: */*
121+
1 (1%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(5) "done."
011+ string(339) "GET /foo/bar HTTP/1.1
012+ Host: 127.0.0.1:12342
013+ User-Agent: PHP/5.4.0
014+ Accept: */*
015+
016+ GET /foo/bar2 HTTP/1.0
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"
018- }
019- string(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
018+ User-Agent: PHP/5.4.0
019+ Accept: */*
021+ GET /foo/bar3 HTTP/1.0
023+ User-Agent: PHP/5.4.0
024+ Accept: */*
023- GET /foo/bar2 HTTP/1.0
026+ GET /foo/bar4 HTTP/1.0
026- GET /foo/bar3 HTTP/1.0
028+ User-Agent: PHP/5.4.0
029+ Accept: */*
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
033+ resource(15) of type (stream)
034+ array(2) {
035+ ["headers"]=>
036+ array(0) {
037+ }
038+ ["readbuf"]=>
039+ resource(16) of type (stream)
040+ }
041+ string(0) ""
042+ string(254) "GET /foo/bar HTTP/1.1
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
044+ User-Agent: PHP/5.4.0
045+ Accept: */*
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+ User-Agent: PHP/5.4.0
050+ Accept: */*
052+ GET /foo/bar3 HTTP/1.0
053+ Host: 127.0.0.1:12342
054+ User-Agent: PHP/5.4.0
055+ Accept: */*
056+
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
059+ resource(21) of type (stream)
060+ array(2) {
061+ ["headers"]=>
062+ array(0) {
063+ }
064+ ["readbuf"]=>
065+ resource(22) of type (stream)
066+ }
067+ string(1) "1"
068+ string(84) "GET /foo/bar HTTP/1.1
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"
069- string(48) "GET /foo/bar HTTP/1.0
070+ User-Agent: PHP/5.4.0
071+ Accept: */*
075+ resource(27) of type (stream)
076+ array(2) {
077+ ["headers"]=>
078+ array(0) {
079+ }
080+ ["readbuf"]=>
081+ resource(28) of type (stream)
082+ }
083+ string(1) "1"
084+ string(84) "GET /foo/bar HTTP/1.1
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+ User-Agent: PHP/5.4.0
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"
093+ ["headers"]=>
094+ array(0) {
095+ }
096+ ["readbuf"]=>
097+ resource(34) of type (stream)
099- string(97) "GET /foo/bar HTTP/1.0
100+ string(84) "GET /foo/bar HTTP/1.1
102+ User-Agent: PHP/5.4.0
103+ Accept: */*
109+ ["headers"]=>
110+ array(0) {
111+ }
112+ ["readbuf"]=>
113+ resource(40) of type (stream)
116+ string(84) "GET /foo/bar HTTP/1.1
118+ User-Agent: PHP/5.4.0
119+ Accept: */*
124+ array(2) {
125+ ["headers"]=>
126+ array(0) {
127+ }
128+ ["readbuf"]=>
129+ resource(46) of type (stream)
132+ string(254) "GET /foo/bar HTTP/1.1
134+ User-Agent: PHP/5.4.0
135+ Accept: */*
139+ User-Agent: PHP/5.4.0
140+ Accept: */*
142+ GET /foo/bar3 HTTP/1.0
143+ Host: 127.0.0.1:12342
144+ User-Agent: PHP/5.4.0
145+ Accept: */*
146+
1 (1%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(5) "done."
011+ string(323) "GET /foo/bar HTTP/1.1
012+ User-Agent: [PHP]
013+ Host: 127.0.0.1:12342
014+ Accept: */*
015+
016+ GET /foo/bar2 HTTP/1.0
017+ User-Agent: [PHP]
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"
018- }
019- string(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
019+ Accept: */*
021+ GET /foo/bar3 HTTP/1.0
022+ User-Agent: [PHP]
023- GET /foo/bar2 HTTP/1.0
024+ Accept: */*
026+ GET /foo/bar4 HTTP/1.0
027+ User-Agent: [PHP]
026- GET /foo/bar3 HTTP/1.0
029+ Accept: */*
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
033+ resource(15) of type (stream)
034+ array(2) {
035+ ["headers"]=>
036+ array(0) {
037+ }
038+ ["readbuf"]=>
039+ resource(16) of type (stream)
040+ }
041+ string(0) ""
042+ string(242) "GET /foo/bar HTTP/1.1
043+ User-Agent: [PHP]
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
045+ Accept: */*
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
048+ User-Agent: [PHP]
050+ Accept: */*
052+ GET /foo/bar3 HTTP/1.0
053+ User-Agent: [PHP]
054+ Host: 127.0.0.1:12342
055+ Accept: */*
056+
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
059+ resource(21) of type (stream)
060+ array(2) {
061+ ["headers"]=>
062+ array(0) {
063+ }
064+ ["readbuf"]=>
065+ resource(22) of type (stream)
066+ }
067+ string(1) "1"
068+ string(80) "GET /foo/bar HTTP/1.1
069+ User-Agent: [PHP]
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"
069- string(48) "GET /foo/bar HTTP/1.0
071+ Accept: */*
075+ resource(27) of type (stream)
076+ array(2) {
077+ ["headers"]=>
078+ array(0) {
079+ }
080+ ["readbuf"]=>
081+ resource(28) of type (stream)
082+ }
083+ string(1) "1"
084+ string(80) "GET /foo/bar HTTP/1.1
085+ User-Agent: [PHP]
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
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"
093+ ["headers"]=>
094+ array(0) {
095+ }
096+ ["readbuf"]=>
097+ resource(34) of type (stream)
099- string(97) "GET /foo/bar HTTP/1.0
100+ string(80) "GET /foo/bar HTTP/1.1
101+ User-Agent: [PHP]
103+ Accept: */*
109+ ["headers"]=>
110+ array(0) {
111+ }
112+ ["readbuf"]=>
113+ resource(40) of type (stream)
116+ string(80) "GET /foo/bar HTTP/1.1
117+ User-Agent: [PHP]
119+ Accept: */*
124+ array(2) {
125+ ["headers"]=>
126+ array(0) {
127+ }
128+ ["readbuf"]=>
129+ resource(46) of type (stream)
132+ string(242) "GET /foo/bar HTTP/1.1
133+ User-Agent: [PHP]
135+ Accept: */*
138+ User-Agent: [PHP]
140+ Accept: */*
142+ GET /foo/bar3 HTTP/1.0
143+ User-Agent: [PHP]
144+ Host: 127.0.0.1:12342
145+ Accept: */*
146+
1 (1%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(0) ""
011+ string(0) ""
012+ -- Test: fail after 2 redirections --
013+ resource(15) of type (stream)
014+ array(2) {
015+ ["headers"]=>
016+ array(0) {
017+ }
018+ ["readbuf"]=>
019+ resource(16) 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(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
021+ string(0) ""
022+ string(254) "GET /foo/bar HTTP/1.1
023+ User-Agent: PHP/5.4.0
025+ Accept: */*
028+ User-Agent: PHP/5.4.0
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
030+ Accept: */*
033+ User-Agent: PHP/5.4.0
033- -- Test: fail after 2 redirections --
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 --
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
035+ Accept: */*
038+ -- Test: fail at first redirection --
039+ resource(21) of type (stream)
040+ array(2) {
041+ ["headers"]=>
042+ array(0) {
043+ }
044+ ["readbuf"]=>
045+ resource(22) of type (stream)
046+ }
047+ string(0) ""
048+ string(0) ""
049+ -- Test: fail at first redirection (2) --
050+ resource(27) of type (stream)
051+ array(2) {
052+ ["headers"]=>
053+ array(0) {
054+ }
055+ ["readbuf"]=>
056+ resource(28) of type (stream)
057+ }
058+ string(1) "1"
059+ string(84) "GET /foo/bar HTTP/1.1
060+ User-Agent: PHP/5.4.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 --
062+ Accept: */*
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"
065+ -- Test: return at first redirection --
066+ resource(33) of type (stream)
067+ array(2) {
068+ ["headers"]=>
069+ array(0) {
070+ }
071+ ["readbuf"]=>
072+ resource(34) of type (stream)
073+ }
074+ string(1) "1"
075+ string(84) "GET /foo/bar HTTP/1.1
076+ User-Agent: PHP/5.4.0
068- string(1) "1"
069- string(48) "GET /foo/bar HTTP/1.0
070- Host: 127.0.0.1:12342
071-
072- "
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"
078+ Accept: */*
081+ -- Test: return at first redirection (2) --
081- string(1) "1"
082- string(48) "GET /foo/bar HTTP/1.0
084+ ["headers"]=>
085+ array(0) {
086+ }
087+ ["readbuf"]=>
088+ resource(40) of type (stream)
090+ string(0) ""
091+ string(0) ""
092+ -- Test: return at second redirection --
095+ ["headers"]=>
096+ array(0) {
097+ }
098+ ["readbuf"]=>
099+ resource(46) of type (stream)
101+ string(0) ""
102+ string(254) "GET /foo/bar HTTP/1.1
103+ User-Agent: PHP/5.4.0
105+ Accept: */*
107+ GET /foo/bar2 HTTP/1.0
108+ User-Agent: PHP/5.4.0
109+ Host: 127.0.0.1:12342
110+ Accept: */*
111+
112+ GET /foo/bar3 HTTP/1.0
113+ User-Agent: PHP/5.4.0
114+ Host: 127.0.0.1:12342
115+ Accept: */*
116+
086- -- Test: return at second redirection --
087- resource(%d) of type (stream)
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"
097- }
098- string(0) ""
099- string(97) "GET /foo/bar HTTP/1.0
100- Host: 127.0.0.1:12342
101-
102- GET /foo/bar2 HTTP/1.0
103- Host: 127.0.0.1:12342
104-
105- "
1 (1%)
003+ array(2) {
004+ ["headers"]=>
005+ array(0) {
006+ }
007+ ["readbuf"]=>
008+ resource(10) of type (stream)
009+ }
010+ string(0) ""
011+ string(0) ""
012+ -- Test: fail after 2 redirections --
013+ resource(15) of type (stream)
014+ array(2) {
015+ ["headers"]=>
016+ array(0) {
017+ }
018+ ["readbuf"]=>
019+ resource(16) 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(5) "done."
020- string(195) "GET /foo/bar HTTP/1.0
021+ string(0) ""
022+ string(254) "GET /foo/bar HTTP/1.1
023+ User-Agent: PHP/5.4.0
025+ Accept: */*
028+ User-Agent: PHP/5.4.0
029- GET /foo/bar4 HTTP/1.0
030- Host: 127.0.0.1:12342
031-
030+ Accept: */*
033+ User-Agent: PHP/5.4.0
033- -- Test: fail after 2 redirections --
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+ Accept: */*
038+ -- Test: fail at first redirection --
039+ resource(21) of type (stream)
040+ array(2) {
041+ ["headers"]=>
042+ array(0) {
043+ }
044+ ["readbuf"]=>
045+ resource(22) of type (stream)
046+ }
047+ string(1) "1"
048+ string(84) "GET /foo/bar HTTP/1.1
049+ User-Agent: PHP/5.4.0
040- GET /foo/bar2 HTTP/1.0
041- Host: 127.0.0.1:12342
042-
044- -- Test: fail at first redirection --
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
051+ Accept: */*
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
054+ -- Test: fail at first redirection (2) --
055+ resource(27) of type (stream)
056+ array(2) {
057+ ["headers"]=>
058+ array(0) {
059+ }
060+ ["readbuf"]=>
061+ resource(28) of type (stream)
062+ }
063+ string(1) "1"
064+ string(84) "GET /foo/bar HTTP/1.1
065+ User-Agent: PHP/5.4.0
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+ Accept: */*
069- string(48) "GET /foo/bar HTTP/1.0
070+ -- Test: return at first redirection --
071+ resource(33) of type (stream)
072+ array(2) {
073+ ["headers"]=>
074+ array(0) {
075+ }
076+ ["readbuf"]=>
077+ resource(34) of type (stream)
078+ }
079+ string(1) "1"
080+ string(84) "GET /foo/bar HTTP/1.1
081+ User-Agent: PHP/5.4.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"
081- string(1) "1"
082- string(48) "GET /foo/bar HTTP/1.0
083+ Accept: */*
086+ -- Test: return at first redirection (2) --
089+ ["headers"]=>
090+ array(0) {
091+ }
092+ ["readbuf"]=>
093+ resource(40) of type (stream)
096+ string(84) "GET /foo/bar HTTP/1.1
097+ User-Agent: PHP/5.4.0
099+ Accept: */*
102+ -- Test: return at second redirection --
105+ ["headers"]=>
106+ array(0) {
107+ }
108+ ["readbuf"]=>
109+ resource(46) of type (stream)
111+ string(0) ""
112+ string(254) "GET /foo/bar HTTP/1.1
113+ User-Agent: PHP/5.4.0
115+ Accept: */*
117+ GET /foo/bar2 HTTP/1.0
118+ User-Agent: PHP/5.4.0
119+ Host: 127.0.0.1:12342
120+ Accept: */*
121+
122+ GET /foo/bar3 HTTP/1.0
123+ User-Agent: PHP/5.4.0
124+ Host: 127.0.0.1:12342
125+ Accept: */*
126+
086- -- Test: return at second redirection --
087- resource(%d) of type (stream)
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"
097- }
098- string(0) ""
099- string(97) "GET /foo/bar HTTP/1.0
100- Host: 127.0.0.1:12342
101-
102- GET /foo/bar2 HTTP/1.0
103- Host: 127.0.0.1:12342
104-
105- "