8000 [HttpClient] Minor fixes · symfony/symfony@356341b · GitHub
[go: up one dir, main page]

Skip to content

Commit 356341b

Browse files
committed
[HttpClient] Minor fixes
1 parent c7aad8d commit 356341b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ private function addHttpClientSection(ArrayNodeDefinition $rootNode)
14811481
->info('A comma separated list of hosts that do not require a proxy to be reached.')
14821482
->end()
14831483
->floatNode('timeout')
1484-
->info('Defaults to "default_socket_timeout" ini parameter.')
1484+
->info('The idle timeout, defaults to the "default_socket_timeout" ini parameter.')
14851485
->end()
14861486
->scalarNode('bindto')
14871487
->info('A network interface name, IP address, a host name or a UNIX socket to bind to.')

src/Symfony/Component/HttpClient/Response/MockResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MockResponse implements ResponseInterface
3737

3838
/**
3939
* @param string|string[]|iterable $body The response body as a string or an iterable of strings,
40-
* yielding an empty string simulates a timeout,
40+
* yielding an empty string simulates an idle timeout,
4141
* exceptions are turned to TransportException
4242
*
4343
* @see ResponseInterface::getInfo() for possible info, e.g. "response_headers"
@@ -277,7 +277,7 @@ private static function readResponse(self $response, array $options, ResponseInt
277277
if (!\is_string($body)) {
278278
foreach ($body as $chunk) {
279279
if ('' === $chunk = (string) $chunk) {
280-
// simulate a timeout
280+
// simulate an idle timeout
281281
$response->body[] = new ErrorChunk($offset);
282282
} else {
283283
$response->body[] = $chunk;

src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ public function testResolve()
580580

581581
$response = null;
582582
$this->expectException(TransportExceptionInterface::class);
583-
$client->request('GET', 'http://symfony.com:8057/', ['timeout' => 3]);
583+
$client->request('GET', 'http://symfony.com:8057/', ['timeout' => 1]);
584584
}
585585

586586
public function testTimeoutOnAccess()
@@ -643,7 +643,6 @@ public function testDestruct()
643643
{
644644
$client = $this->getHttpClient(__FUNCTION__);
645645

646-
$downloaded = 0;
647646
$start = microtime(true);
648647
$client->request('GET', 'http://localhost:8057/timeout-long');
649648
$client = null;

0 commit comments

Comments
 (0)
0