diff --git a/h11/_connection.py b/h11/_connection.py index e37d82a..f6e3af2 100644 --- a/h11/_connection.py +++ b/h11/_connection.py @@ -546,7 +546,8 @@ def send_with_data_passthrough(self, event: Event) -> Optional[List[bytes]]: :meth:`send` returns a single :term:`bytes-like object`, this instead returns a list of them -- and when sending a :class:`Data` event, this list is guaranteed to contain the exact object you passed in as - :attr:`Data.data`. See :ref:`sendfile` for discussion. + :attr:`Data.data`, except that empty data may be omitted when using + chunked transfer encoding. See :ref:`sendfile` for discussion. """ if self.our_state is ERROR: diff --git a/newsfragments/217.doc.rst b/newsfragments/217.doc.rst new file mode 100644 index 0000000..014786c --- /dev/null +++ b/newsfragments/217.doc.rst @@ -0,0 +1 @@ +Clarify that empty data may be omitted by send_with_data_passthrough when chunked transfer encoding is used.