Skip to content

Commit 8f7bcf7

Browse files
committed
Tweaks and rewords
1 parent 606acbb commit 8f7bcf7

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

http_client.rst

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,14 +1791,25 @@ You can also pass a set of default options to your client thanks to the
17911791

17921792
.. _auto-upgrade-http-version:
17931793

1794-
.. versionadded:: 7.4
1794+
You can use the ``auto_upgrade_http_version`` option to control whether the HTTP
1795+
protocol version is automatically upgraded::
1796+
1797+
$client = (new Psr18Client())
1798+
->withOptions([
1799+
// set to false to always use the HTTP version defined in your request;
1800+
// set to true to allow the server to upgrade the HTTP version in its response
1801+
'auto_upgrade_http_version' => false
1802+
// ...
1803+
]);
1804+
1805+
.. note::
17951806

1796-
Starting in Symfony 7.4, the option `auto_upgrade_http_version` can
1797-
be set to false to disable automatic HTTP protocol version upgrade when
1798-
desired.
1807+
The ``auto_upgrade_http_version`` option is ignored for HTTP/1.0 requests,
1808+
which always keep that protocol version.
1809+
1810+
.. versionadded:: 7.4
17991811

1800-
The automatic HTTP version upgrade is always disabled for HTTP/1.0 requests,
1801-
regardless of the option value.
1812+
The ``auto_upgrade_http_version`` option was introduced in Symfony 7.4.
18021813

18031814
HTTPlug
18041815
~~~~~~~
@@ -1902,7 +1913,8 @@ You can also pass a set of default options to your client thanks to the
19021913
// ...
19031914

19041915

1905-
See :ref:`auto_upgrade_http_version <auto-upgrade-http-version>` option for details about how the HTTP protocol version selection works.
1916+
See the :ref:`auto_upgrade_http_version <auto-upgrade-http-version>` option for
1917+
details about how the HTTP protocol version selection works.
19061918

19071919
Native PHP Streams
19081920
~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)