Skip to content

Commit 9a41f6b

Browse files
committed
test: add testSendProxied
1 parent 1db90c4 commit 9a41f6b

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/system/HTTP/CURLRequestTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,18 @@ 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+
721733
/**
722734
* See: https://github.com/codeigniter4/CodeIgniter4/issues/3261
723735
*/

0 commit comments

Comments
 (0)