From 82d97da61f7c768f4960b6d58439645c6815928d Mon Sep 17 00:00:00 2001 From: Timofey Peshin Date: Fri, 17 Jan 2025 20:03:02 -0800 Subject: [PATCH] clarify RequestReceived CONTINUATION frame behavior --- src/h2/events.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/h2/events.py b/src/h2/events.py index 2c340942..83080614 100644 --- a/src/h2/events.py +++ b/src/h2/events.py @@ -23,9 +23,13 @@ class Event: class RequestReceived(Event): """ - The RequestReceived event is fired whenever request headers are received. - This event carries the HTTP headers for the given request and the stream ID - of the new stream. + The RequestReceived event is fired whenever all of a request's headers + are received. This event carries the HTTP headers for the given request + and the stream ID of the new stream. + + In HTTP/2, headers may be sent as a HEADERS frame followed by zero or more + CONTINUATION frames with the final frame setting the END_HEADERS flag. + This event is fired after the entire sequence is received. .. versionchanged:: 2.3.0 Changed the type of ``headers`` to :class:`HeaderTuple