Skip to content

Commit 61df3ee

Browse files
committed
Better warning
1 parent eec920b commit 61df3ee

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

clients/socket-client.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,14 @@ use case would be::
6565

6666
.. warning::
6767

68-
This client assume that the request is compliant with HTTP 2.0, 1.1 or 1.0 standard. So a request without a ``Host`` header, or
69-
with a body but without a ``Content-Length`` will certainly fail. You can make sure that requests used by this client are valid, by
70-
decorating it with :doc:`plugins </plugins/introduction>` like ``ContentLengthPlugin`` or ``HeaderDefaultsPlugin``.
68+
This client assumes that the request is compliant with HTTP 2.0, 1.1 or 1.0 standard. So a request without a ``Host`` header, or
69+
with a body but without a ``Content-Length`` will certainly fail.
70+
If you don't trust incoming requests, we heavily recommend you to use the ``PluginClient`` with the following plugins:
71+
72+
* ``ContentLengthPlugin``, Allow to set the correct ``Content-Length`` header, or decorate the stream to use chunked encoding
73+
* ``DecoderPlugin``, Allow to decode encoding coming from the response (chunked, gzip, deflate, ...)
74+
* ``HeaderDefaultsPlugin``, Allow to set default headers values if not present (like for the ``Host`` header)
75+
76+
:doc:`Read more on plugins </plugins/introduction>`
7177

7278
.. include:: includes/further-reading-sync.inc

0 commit comments

Comments
 (0)