File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -718,18 +718,6 @@ public function testSendContinued()
718718 $ this ->assertSame ('Hi there ' , $ response ->getBody ());
719719 }
720720
721- public function testSendProxied ()
722- {
723- $ request = $ this ->getRequest ([
724- 'base_uri ' => 'http://www.foo.com/api/v1/ ' ,
725- 'delay ' => 100 ,
726- ]);
727-
728- $ request ->setOutput ("HTTP/1.1 200 Connection established \x0d\x0a\x0d\x0aHi there " );
729- $ response = $ request ->get ('answer ' );
730- $ this ->assertSame ('Hi there ' , $ response ->getBody ());
731- }
732-
733721 /**
734722 * See: https://github.com/codeigniter4/CodeIgniter4/issues/3261
735723 */
@@ -777,6 +765,21 @@ public function testSendContinuedWithManyHeaders()
777765 $ this ->assertSame (200 , $ response ->getStatusCode ());
778766 }
779767
768+ public function testSendProxied ()
769+ {
770+ $ request = $ this ->getRequest ([
771+ 'base_uri ' => 'http://www.foo.com/api/v1/ ' ,
772+ 'delay ' => 100 ,
773+ ]);
774+
775+ $ output = "HTTP/1.1 200 Connection established
776+ Proxy-Agent: Fortinet-Proxy/1.0 \x0d\x0a\x0d\x0aHTTP/1.1 200 OK \x0d\x0a\x0d\x0aHi there " ;
777+ $ request ->setOutput ($ output );
778+
779+ $ response = $ request ->get ('answer ' );
780+ $ this ->assertSame ('Hi there ' , $ response ->getBody ());
781+ }
782+
780783 /**
781784 * See: https://github.com/codeigniter4/CodeIgniter4/issues/7394
782785 */
You can’t perform that action at this time.
0 commit comments