Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e9afce3

Browse filesBrowse files
committed
[HttpClient] Revert bindto workaround
… for unaffected PHP versions Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 7ca0995 commit e9afce3
Copy full SHA for e9afce3

File tree

1 file changed

+6
-1
lines changed
Filter options

1 file changed

+6
-1
lines changed

‎src/Symfony/Component/HttpClient/NativeHttpClient.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/NativeHttpClient.php
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ public function request(string $method, string $url, array $options = []): Respo
193193
$options['timeout'] = min($options['max_duration'], $options['timeout']);
194194
}
195195

196+
$bindto = $options['bindto'];
197+
if (!$bindto && (70322 === \PHP_VERSION_ID || 70410 === \PHP_VERSION_ID)) {
198+
$bindto = '0:0';
199+
}
200+
196201
$context = [
197202
'http' => [
198203
'protocol_version' => min($options['http_version'] ?: '1.1', '1.1'),
@@ -221,7 +226,7 @@ public function request(string $method, string $url, array $options = []): Respo
221226
'disable_compression' => true,
222227
], static function ($v) { return null !== $v; }),
223228
'socket' => [
224-
'bindto' => $options['bindto'] ?: '0:0',
229+
'bindto' => $bindto,
225230
'tcp_nodelay' => true,
226231
],
227232
];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.