From 8b61c956858fb880365365ebe9397b729df58b81 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 4 Jan 2020 15:00:37 +0100 Subject: [PATCH] [HttpClient] NativeHttpClient should not send >1.1 protocol version --- src/Symfony/Component/HttpClient/NativeHttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpClient/NativeHttpClient.php b/src/Symfony/Component/HttpClient/NativeHttpClient.php index de6667d540..7081842ddf 100644 --- a/src/Symfony/Component/HttpClient/NativeHttpClient.php +++ b/src/Symfony/Component/HttpClient/NativeHttpClient.php @@ -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,