File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,13 @@ public function testHeaderCaseSensitivity() {
381
381
$ this ->assertEquals ($ response_headers ['eTaG ' ], $ etag );
382
382
}
383
383
384
+ public function testHeaderRedirect () {
385
+ $ test = new Test ();
386
+ $ test ->curl ->setOpt (CURLOPT_FOLLOWLOCATION , true );
387
+ $ test ->server ('redirect ' , 'GET ' );
388
+ $ this ->assertEquals ($ test ->curl ->response , 'OK ' );
389
+ }
390
+
384
391
public function testRequestURL () {
385
392
$ test = new Test ();
386
393
$ this ->assertFalse (substr ($ test ->server ('request_uri ' , 'GET ' ), -1 ) === '? ' );
Original file line number Diff line number Diff line change 139
139
}
140
140
exit ;
141
141
}
142
+ else if ($ test === 'redirect ' ) {
143
+ if (!isset ($ _GET ['redirect ' ])) {
144
+ header ('Location: ?redirect ' );
145
+ exit ;
146
+ }
147
+
148
+ echo 'OK ' ;
149
+ exit ;
150
+ }
142
151
143
152
header ('Content-Type: text/plain ' );
144
153
You can’t perform that action at this time.
0 commit comments