[HttpClient] NativeHttpClient should not send >1.1 protocol version

This commit is contained in:
Nicolas Grekas 2020-01-04 15:00:37 +01:00
parent cf83c608d3
commit 8b61c95685

View File

@ -170,7 +170,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
$context = [
'http' => [
'protocol_version' => $options['http_version'] ?: '1.1',
'protocol_version' => min($options['http_version'] ?: '1.1', '1.1'),
'method' => $method,
'content' => $options['body'],
'ignore_errors' => true,