Skip to content

Commit 917607c

Browse files
committed
test: add the test case for multiple HTTP100.
1 parent 2de7be1 commit 917607c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/system/HTTP/CURLRequestTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,4 +1109,24 @@ public function testUserAgentOption(): void
11091109
$this->assertArrayHasKey(CURLOPT_USERAGENT, $options);
11101110
$this->assertSame($agent, $options[CURLOPT_USERAGENT]);
11111111
}
1112+
1113+
public function testMultipleHTTP100(): void
1114+
{
1115+
$output = 'HTTP/1.1 100 Continue
1116+
Mark bundle as not supporting multiuse
1117+
HTTP/1.1 100 Continue
1118+
Mark bundle as not supporting multiuse
1119+
HTTP/1.1 200 OK
1120+
Server: Werkzeug/2.2.2 Python/3.7.17
1121+
Date: Sun, 28 Jan 2024 06:05:36 GMT
1122+
Content-Type: application/json
1123+
Content-Length: 33
1124+
Connection: close';
1125+
1126+
$this->request->setOutput($output);
1127+
1128+
$response = $this->request->request('get', 'http://example.com');
1129+
1130+
$this->assertSame(200, $response->getStatusCode());
1131+
}
11121132
}

0 commit comments

Comments
 (0)