Skip to content

Commit b502408

Browse files
[HttpClient] Fix sending content-length when streaming the body
1 parent 5236c15 commit b502408

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

HttpClient/Test/HttpClientTestCase.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,16 @@ public function test304()
332332
$this->assertSame('', $response->getContent(false));
333333
}
334334

335-
public function testRedirects()
335+
/**
336+
* @testWith [[]]
337+
* [["Content-Length: 7"]]
338+
*/
339+
public function testRedirects(array $headers = [])
336340
{
337341
$client = $this->getHttpClient(__FUNCTION__);
338342
$response = $client->request('POST', 'http://localhost:8057/301', [
339343
'auth_basic' => 'foo:bar',
344+
'headers' => $headers,
340345
'body' => function () {
341346
yield 'foo=bar';
342347
},

0 commit comments

Comments
 (0)