@@ -1110,23 +1110,29 @@ public function testUserAgentOption(): void
1110
1110
$ this ->assertSame ($ agent , $ options [CURLOPT_USERAGENT ]);
1111
1111
}
1112
1112
1113
+ /**
1114
+ * @see https://github.com/codeigniter4/CodeIgniter4/issues/8347
1115
+ */
1113
1116
public function testMultipleHTTP100 (): void
1114
1117
{
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 ' ;
1118
+ $ jsonBody = '{"name":"John Doe","age":30} ' ;
1119
+
1120
+ $ output = "HTTP/1.1 100 Continue
1121
+ Mark bundle as not supporting multiuse
1122
+ HTTP/1.1 100 Continue
1123
+ Mark bundle as not supporting multiuse
1124
+ HTTP/1.1 200 OK
1125
+ Server: Werkzeug/2.2.2 Python/3.7.17
1126
+ Date: Sun, 28 Jan 2024 06:05:36 GMT
1127
+ Content-Type: application/json
1128
+ Content-Length: 33 \r\n\r\n" . $ jsonBody ;
1125
1129
1126
1130
$ this ->request ->setOutput ($ output );
1127
1131
1128
1132
$ response = $ this ->request ->request ('get ' , 'http://example.com ' );
1129
1133
1134
+ $ this ->assertSame ($ jsonBody , $ response ->getBody ());
1135
+
1130
1136
$ this ->assertSame (200 , $ response ->getStatusCode ());
1131
1137
}
1132
1138
}
0 commit comments