+
    LV-jïh  ã                   óJ  € ^ RI HtHtHtHtHtHtHtHtH	t	H
t
 ^RIHtHtHtHtHtHtHt ^RIHtHtHt ^RIHtHt ^RIHt ^RIHtHtHtH t H!t!H"t"H#t#H$t$H%t%H&t& ^RI'H(t(H)t)H*t* ^RI+H,t,H-t- . ROt. ! R R
]*]*R7      t/ ! R R]*]*R7      t0Rt1R R lt2R R lt3 ! R R	4      t4R# )é    )
ÚAnyÚCallableÚcastÚDictÚListÚOptionalÚoverloadÚTupleÚTypeÚUnion)ÚConnectionClosedÚDataÚEndOfMessageÚEventÚInformationalResponseÚRequestÚResponse)Úget_comma_headerÚhas_expect_100_continueÚset_comma_header)ÚREADERSÚReadersType)ÚReceiveBuffer)
Ú_SWITCH_CONNECTÚ_SWITCH_UPGRADEÚCLIENTÚConnectionStateÚDONEÚERRORÚMIGHT_SWITCH_PROTOCOLÚ	SEND_BODYÚSERVERÚSWITCHED_PROTOCOL)ÚLocalProtocolErrorÚRemoteProtocolErrorÚSentinel)ÚWRITERSÚWritersTypeÚ
ConnectionÚ	NEED_DATAÚPAUSEDc                   ó   € ] tR t^3tRtR# )r*   © N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r-   ó    Ú`/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/h11/_connection.pyr*   r*   3   ó   † Ûr4   )Ú	metaclassc                   ó   € ] tR t^7tRtR# )r+   r-   Nr.   r-   r4   r5   r+   r+   7   r6   r4   c                óR   € V ^8„  d   QhR\         \        \        3,          R\        /# ©é   ÚeventÚreturn)r   r   r   Úbool)Úformats   "r5   Ú__annotate__r@   T   s$   € ÷ ñ ”uœW¤hÐ.Õ/ð ´Dñ r4   c                 ól   € \        V P                  R 4      pRV9   d   R# \        V RR4      R8  d   R# R# )ó
   connectionó   closeFÚhttp_versionó   1.1T)r   ÚheadersÚgetattr)r<   Ú
connections   & r5   Ú_keep_aliverI   T   s4   € Ü! %§-¡-°Ó?€JØ�:ÔÙÜˆu�n fÓ-°Ô6ÙÙr4   c                óÆ   € V ^8„  d   QhR\         R\        \        \        3,          R\        \
        \        \        R,          \        \        ,          3,          3,          /# )r;   Úrequest_methodr<   r=   r-   )Úbytesr   r   r   r
   ÚstrÚint)r?   s   "r5   r@   r@   ]   sJ   € ÷ 0 ñ 0 Üð0 Ü"'¬´Ð(9Õ":ð0 ä
Œ3””e˜B•i¤¤s¥Ð+Õ,Ð,Õ-ñ0 r4   c                 óè  € \        V4      \        \        39   g   Q h\        V4      \        J dQ   VP                  R9   g+   V R8X  g$   V R8X  d   ^ÈVP                  u;8:  d   R8  d   M MR	# VP                  ^È8¼  g   Q h\	        VP
                  R4      pV'       d   VR.8X  g   Q hR
# \	        VP
                  R4      pV'       d   R\        V^ ,          4      33# \        V4      \        J d   R	# R# )éÌ   ó   HEADó   CONNECTé,  úcontent-lengthó   transfer-encodingó   chunkedó   content-length)rP   i0  )rT   )r   )Úchunkedr-   )úhttp/1.0r-   )Útyper   r   Ústatus_coder   rF   rN   )rK   r<   Útransfer_encodingsÚcontent_lengthss   &&  r5   Ú_body_framingr^   ]   sê   € ô �‹;œ7¤HÐ-Ô-Ð-Ð-ô ˆEƒ{”hÓà×Ñ Ô+Ø Ô(Ø *Ô,°¸×8IÑ8IÖ1OÈC×1Oà+Ð+ð × Ñ  CÔ'Ð'Ð'ô *¨%¯-©-Ð9MÓNÐßØ! j \Ô1Ð1Ð1ØÐô ' u§}¡}Ð6GÓH€OßØ ¤3 °qÕ'9Ó#:Ð"<Ð=Ð=ô ˆEƒ{”gÓØ'Ð'àÐr4   c                   ó
  a € ] tR t^—t o Rt]3V 3R lR llt]V 3R lR l4       t]V 3R lR l4       t	]V 3R lR	 l4       t
]V 3R
 lR l4       tV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltR0V 3R lR llt]V 3R lR l4       tV 3R lR ltV 3R lR ltV 3R lR  lt]V 3R! lR" l4       t]V 3R# lR$ l4       t]V 3R% lR& l4       tV 3R' lR( ltV 3R) lR* ltV 3R+ lR, ltV 3R- lR. ltR/tV tR# )1r)   a  An object encapsulating the state of an HTTP connection.

Args:
    our_role: If you're implementing a client, pass :data:`h11.CLIENT`. If
        you're implementing a server, pass :data:`h11.SERVER`.

    max_incomplete_event_size (int):
        The maximum number of bytes we're willing to buffer of an
        incomplete event. In practice this mostly sets a limit on the
        maximum size of the request/response line + headers. If this is
        exceeded, then :meth:`next_event` will raise
        :exc:`RemoteProtocolError`.

c                ó:   <€ V ^8„  d   QhRS[ S[,          RS[RR/# )r;   Úour_roleÚmax_incomplete_event_sizer=   N)r   r&   rN   )r?   Ú__classdict__s   "€r5   r@   ÚConnection.__annotate__§   s-   ø€ ÷ %8ñ %8á‘x•.ð%8ñ $'ð%8ð 
ñ	%8r4   c                ó°  € W n         V\        \        39  d   \        R V: 24      hWn        V  V\        J d   \        V n        M\        V n        \        4       V n        V P                  V P                  R\        4      V n
        V P                  V P
                  R\        4      V n        \        4       V n        RV n        RV n        RV n        RV n        R# )zexpected CLIENT or SERVER, not NF)Ú_max_incomplete_event_sizer   r"   Ú
ValueErrorra   Ú
their_roler   Ú_cstateÚ_get_io_objectr'   Ú_writerr   Ú_readerr   Ú_receive_bufferÚ_receive_buffer_closedÚtheir_http_versionÚ_request_methodÚ"client_is_waiting_for_100_continue)Úselfra   rb   s   &&&r5   Ú__init__ÚConnection.__init__§   s»   € ð
 +DÔ'àœF¤FÐ+Ô+ÜÐ>¸x¹lÐKÓLÐLØ ŒÙØ”vÓÜ$ˆD�Oä$ˆDŒOÜ&Ó(ˆŒð ×*Ñ*¨4¯=©=¸$ÄÓHˆŒØ×*Ñ*¨4¯?©?¸DÄ'ÓJˆŒô  -›ˆÔð ',ˆÔ#ð 48ˆÔØ04ˆÔð 38ˆÖ/r4   c                óV   <€ V ^8„  d   QhRS[ S[S[,          S[S[,          3,          /# ©r;   r=   )r   r   r&   )r?   rc   s   "€r5   r@   rd   Ï   s&   ø€ ÷ )ñ )™™T¡(�^©T±(­^Ð;Õ<ñ )r4   c                ó@   € \        V P                  P                  4      # )zqA dictionary like::

   {CLIENT: <client state>, SERVER: <server state>}

See :ref:`state-machine` for details.

)Údictri   Ústates©rr   s   &r5   ry   ÚConnection.statesÎ   s   € ô �D—L‘L×'Ñ'Ó(Ð(r4   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# rv   ©r   r&   )r?   rc   s   "€r5   r@   rd   Ú   s   ø€ ÷ 2ñ 2™4¡�>ñ 2r4   c                óP   € V P                   P                  V P                  ,          # )zZThe current state of whichever role we are playing. See
:ref:`state-machine` for details.
)ri   ry   ra   rz   s   &r5   Ú	our_stateÚConnection.our_stateÙ   s   € ð
 �|‰|×"Ñ" 4§=¡=Õ1Ð1r4   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# rv   r}   )r?   rc   s   "€r5   r@   rd   á   s   ø€ ÷ 4ñ 4™T¡(�^ñ 4r4   c                óP   € V P                   P                  V P                  ,          # )z^The current state of whichever role we are NOT playing. See
:ref:`state-machine` for details.
)ri   ry   rh   rz   s   &r5   Útheir_stateÚConnection.their_stateà   s   € ð
 �|‰|×"Ñ" 4§?¡?Õ3Ð3r4   c                ó    <€ V ^8„  d   QhRS[ /# rv   )r>   )r?   rc   s   "€r5   r@   rd   è   s   ø€ ÷ Uñ U±4ñ Ur4   c                óN   € V P                   \        J ;'       d    V P                  # ©N)rh   r   rq   rz   s   &r5   Ú!they_are_waiting_for_100_continueÚ,Connection.they_are_waiting_for_100_continueç   s   € à�‰¤&Ð(×TÐT¨T×-TÑ-TÐTr4   c                ó   <€ V ^8„  d   QhRR/# ©r;   r=   Nr-   )r?   rc   s   "€r5   r@   rd   ë   s   ø€ ÷ 3ñ 3 $ñ 3r4   c                óÐ   € \        V P                  P                  4      pV P                  P                  4        RV n        V P
                  '       d   Q hV P                  V4       R# )aI  Attempt to reset our connection state for a new request/response
cycle.

If both client and server are in :data:`DONE` state, then resets them
both to :data:`IDLE` state in preparation for a new request/response
cycle on this same connection. Otherwise, raises a
:exc:`LocalProtocolError`.

See :ref:`keepalive-and-pipelining`.

N)rx   ri   ry   Ústart_next_cyclerp   rq   Ú_respond_to_state_changes)rr   Ú
old_statess   & r5   r�   ÚConnection.start_next_cycleë   sR   € ô ˜$Ÿ,™,×-Ñ-Ó.ˆ
Ø�‰×%Ñ%Ô'Ø#ˆÔð ×:×:Ð:Ð:Ð:Ø×&Ñ& zÖ2r4   c                ó4   <€ V ^8„  d   QhRS[ S[,          RR/# )r;   Úroler=   Nr}   )r?   rc   s   "€r5   r@   rd   ÿ   s   ø€ ÷ 3ñ 3¡4©¥>ð 3°dñ 3r4   c                óœ   € \        V P                  P                  4      pV P                  P                  V4       V P	                  V4       R # r‡   )rx   ri   ry   Úprocess_errorrŽ   )rr   r’   r�   s   && r5   Ú_process_errorÚConnection._process_errorÿ   s6   € Ü˜$Ÿ,™,×-Ñ-Ó.ˆ
Ø�‰×"Ñ" 4Ô(Ø×&Ñ& zÖ2r4   c                óF   <€ V ^8„  d   QhRS[ RS[S[S[,          ,          /# r:   )r   r   r   r&   )r?   rc   s   "€r5   r@   rd     s$   ø€ ÷ 	ñ 	©%ð 	±H¹TÁ(½^Õ4Lñ 	r4   c                ó  € \        V4      \        J d   VP                  ^e8X  d   \        # \        V4      \        J dC   \
        V P                  P                  9   d$   ^ÈVP                  u;8:  d   R8  d    \
        #  R# R# )ée   rS   N)rZ   r   r[   r   r   r   ri   Úpending_switch_proposals©rr   r<   s   &&r5   Ú_server_switch_eventÚConnection._server_switch_event  sc   € Ü�‹;Ô/Ó/°E×4EÑ4EÈÔ4LÜ"Ð"Ü�‹;œ(Ó"ä 4§<¡<×#HÑ#HÔHØ˜5×,Ñ,Ö2¨sÕ2ä&Ð&ð 3ó r4   c                ó:   <€ V ^8„  d   QhRS[ S[,          RS[RR/# )r;   r’   r<   r=   N)r   r&   r   )r?   rc   s   "€r5   r@   rd     s&   ø€ ÷ .:ñ .:¡4©¥>ð .:¹%ð .:ÀDñ .:r4   c                óÄ  € \        V P                  P                  4      pV\        J d   \	        V4      \
        J dl   VP                  R 8X  d    V P                  P                  \        4       \        VP                  R4      '       d    V P                  P                  \        4       RpV\        J d   V P                  V4      pV P                  P                  V\	        V4      V4       \	        V4      \
        J d   VP                  V n        WP                   J dW   \	        V4      \
        \"        \$        39   d8   \'        \(        \
        \"        \$        3,          V4      pVP*                  V n        \	        V4      \
        \"        39   dK   \/        \'        \(        \
        \"        3,          V4      4      '       g   V P                  P1                  4        \	        V4      \
        J d   \3        V4      '       d   RV n        \	        V4      \$        \"        39   d   RV n        V\        J d"   \	        V4      \6        \8        39   d   RV n        V P;                  W24       R# )rR   s   upgradeNTF)rx   ri   ry   r   rZ   r   ÚmethodÚprocess_client_switch_proposalr   r   rF   r   r"   rœ   Úprocess_eventrp   rh   r   r   r   r   rD   ro   rI   Úprocess_keep_alive_disabledr   rq   r   r   rŽ   )rr   r’   r<   r�   Úserver_switch_events   &&&  r5   Ú_process_eventÚConnection._process_event  s·  € ô ˜$Ÿ,™,×-Ñ-Ó.ˆ
Ø”6‹>œd 5›k¬WÓ4Ø�|‰|˜zÔ)Ø—‘×;Ñ;¼OÔLÜ §¡¨z×:Ò:Ø—‘×;Ñ;¼OÔLØ"ÐØ”6‹>Ø"&×";Ñ";¸EÓ"BÐØ�‰×"Ñ" 4¬¨e«Ð6IÔJô �‹;œ'Ó!Ø#(§<¡<ˆDÔ à—?‘?Ó"¤t¨E£{ÜÜÜ!ð7
ô (
ô
 œœw¬Ô2GÐGÕHÈ%ÓPˆEØ&+×&8Ñ&8ˆDÔ#ô �‹;œ7¤HÐ-Ô-´kÜ””w¤Ð(Õ)¨5Ó1÷7
ò 7
ð �L‰L×4Ñ4Ô6ô �‹;œ'Ó!Ô&=¸e×&DÒ&DØ6:ˆDÔ3Ü�‹;Ô0´(Ð;Ô;Ø6;ˆDÔ3Ø”6‹>œd 5›k¬d´LÐ-AÔAØ6;ˆDÔ3à×&Ñ& zÖ9r4   c                óŒ   <€ V ^8„  d   QhRS[ S[,          RS[S[,          RS[S[S[3,          RS[S[RS[3,          ,          /# )r;   r’   r<   Úio_dictr=   .)	r   r&   r   r   r   r   r(   r   r   )r?   rc   s   "€r5   r@   rd   @  sS   ø€ ÷ .ñ .á‘8�nð.ñ ™�ð.ñ ‘{¡KÐ/Õ0ð	.ñ
 
‘(˜3¡˜8Õ$Õ	%ñ.r4   c                ó.  € V P                   P                  V,          pV\        J d^   \        \	        \
        V P                  4      \	        \        \        \        3,          V4      4      w  rVV\        ,          V,          ! V!  # VP                  W34      # r‡   )ri   ry   r!   r^   r   rL   rp   r   r   r   Úget)rr   r’   r<   r¨   ÚstateÚframing_typeÚargss   &&&&   r5   rj   ÚConnection._get_io_object@  s}   € ð —‘×#Ñ# DÕ)ˆØ”IÓô "/Ü”U˜D×0Ñ0Ó1´4¼¼gÄxÐ>OÕ8PÐRWÓ3Xó"ÑˆLð œ9Õ% lÖ3°TÑ:Ð:ð —;‘; ˜}Ó-Ð-r4   Nc                óp   <€ V ^8„  d   QhRS[ S[S[,          S[S[,          3,          RS[S[,          RR/# )r;   r�   r<   r=   N)r   r   r&   r   r   )r?   rc   s   "€r5   r@   rd   V  sD   ø€ ÷ 	Pñ 	Pá™™h�©©h­Ð7Õ8ð	Pñ ™�ð	Pð 
ñ		Pr4   c                ó&  € V P                   WP                  ,          8w  d'   V P                  V P                  V\        4      V n        V P
                  WP                  ,          8w  d)   V P                  V P                  V\        4      V n        R # R # r‡   )	r   ra   rj   r'   rk   rƒ   rh   r   rl   )rr   r�   r<   s   &&&r5   rŽ   Ú$Connection._respond_to_state_changesV  se   € ð �>‰>˜Z¯©Õ6Ô6Ø×.Ñ.¨t¯}©}¸eÄWÓMˆDŒLØ×Ñ˜z¯/©/Õ:Ô:Ø×.Ñ.¨t¯©ÀÄwÓOˆDŽLñ ;r4   c                ó6   <€ V ^8„  d   QhRS[ S[S[3,          /# rv   )r
   rL   r>   )r?   rc   s   "€r5   r@   rd   b  s    ø€ ÷ Jñ J™u¡U©D [Õ1ñ Jr4   c                óD   € \        V P                  4      V P                  3# )a:  Data that has been received, but not yet processed, represented as
a tuple with two elements, where the first is a byte-string containing
the unprocessed data itself, and the second is a bool that is True if
the receive connection was closed.

See :ref:`switching-protocols` for discussion of why you'd want this.
)rL   rm   rn   rz   s   &r5   Útrailing_dataÚConnection.trailing_dataa  s    € ô �d×*Ñ*Ó+¨T×-HÑ-HÐIÐIr4   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r;   Údatar=   N)rL   )r?   rc   s   "€r5   r@   rd   l  s   ø€ ÷ ,/ñ ,/¡ð ,/¨4ñ ,/r4   c                ó”   € V'       d9   V P                   '       d   \        R4      hV ;P                  V,          un        R# RV n         R# )að  Add data to our internal receive buffer.

This does not actually do any processing on the data, just stores
it. To trigger processing, you have to call :meth:`next_event`.

Args:
    data (:term:`bytes-like object`):
        The new data that was just received.

        Special case: If *data* is an empty byte-string like ``b""``,
        then this indicates that the remote side has closed the
        connection (end of file). Normally this is convenient, because
        standard Python APIs like :meth:`file.read` or
        :meth:`socket.recv` use ``b""`` to indicate end-of-file, while
        other failures to read are indicated using other mechanisms
        like raising :exc:`TimeoutError`. When using such an API you
        can just blindly pass through whatever you get from ``read``
        to :meth:`receive_data`, and everything will work.

        But, if you have an API where reading an empty string is a
        valid non-EOF condition, then you need to be aware of this and
        make sure to check for such strings and avoid passing them to
        :meth:`receive_data`.

Returns:
    Nothing, but after calling this you should call :meth:`next_event`
    to parse the newly received data.

Raises:
    RuntimeError:
        Raised if you pass an empty *data*, indicating EOF, and then
        pass a non-empty *data*, indicating more data that somehow
        arrived after the EOF.

        (Calling ``receive_data(b"")`` multiple times is fine,
        and equivalent to calling it once.)

z(received close, then received more data?TN)rn   ÚRuntimeErrorrm   )rr   r·   s   &&r5   Úreceive_dataÚConnection.receive_datal  s9   € ÷N Ø×*×*Ð*Ü"Ð#MÓNÐNØ× Ò  DÕ(× à*.ˆDÖ'r4   c                óZ   <€ V ^8„  d   QhRS[ S[S[S[,          S[S[,          3,          /# rv   ©r   r   r   r*   r+   )r?   rc   s   "€r5   r@   rd   š  s)   ø€ ÷ ñ á	‰u‘d™9•o¡t©F¥|Ð3Õ	4ñr4   c                óÒ  € V P                   pV\        J d   V P                  '       d   \        # V\        J g   V\
        J d   \        # V P                  f   Q hV P                  V P                  4      pVff   V P                  '       gT   V P                  '       dB   \        V P                  R4      '       d   V P                  P                  4       pM
\        4       pVf   \        pV# )NÚread_eof)rƒ   r   rm   r+   r    r#   rl   rn   Úhasattrr¿   r   r*   )rr   r«   r<   s   &  r5   Ú_extract_next_receive_eventÚ&Connection._extract_next_receive_eventš  sº   € ð × Ñ ˆð
 ”D‹=˜T×1×1Ð1ÜˆMØÔ)Ó)¨UÔ6GÓ-GÜˆMØ�|‰|Ò'Ð'Ð'Ø—‘˜T×1Ñ1Ó2ˆØŠ=Ø×'×'Ð'¨D×,G×,GÐ,Gô
 ˜4Ÿ<™<¨×4Ò4Ø ŸL™L×1Ñ1Ó3‘Eä,Ó.�EØŠ=ÜˆEØˆr4   c                óZ   <€ V ^8„  d   QhRS[ S[S[S[,          S[S[,          3,          /# rv   r½   )r?   rc   s   "€r5   r@   rd   ¶  s(   ø€ ÷ ?ñ ?™E¡%©©i­¹$¹v½,Ð"FÕGñ ?r4   c                óB  € V P                   \        J d   \        R4      h V P                  4       pV\        \
        39  d+   V P                  V P                  \        \        V4      4       V\        J dO   \        V P                  4      V P                  8”  d   \        RRR7      hV P                  '       d   \        R4      hV#   \         dN   pT P                  T P                  4       \!        T\"        4      '       d   TP%                  4         Rp?R# h Rp?ii ; i)an  Parse the next event out of our receive buffer, update our internal
state, and return it.

This is a mutating operation -- think of it like calling :func:`next`
on an iterator.

Returns:
    : One of three things:

    1) An event object -- see :ref:`events`.

    2) The special constant :data:`NEED_DATA`, which indicates that
       you need to read more data from your socket and pass it to
       :meth:`receive_data` before this method will be able to return
       any more events.

    3) The special constant :data:`PAUSED`, which indicates that we
       are not in a state where we can process incoming data (usually
       because the peer has finished their part of the current
       request/response cycle, and you have not yet called
       :meth:`start_next_cycle`). See :ref:`flow-control` for details.

Raises:
    RemoteProtocolError:
        The peer has misbehaved. You should close the connection
        (possibly after sending some kind of 4xx response).

Once this method returns :class:`ConnectionClosed` once, then all
subsequent calls will also return :class:`ConnectionClosed`.

If this method raises any exception besides :exc:`RemoteProtocolError`
then that's a bug -- if it happens please file a bug report!

If this method raises any exception then it also sets
:attr:`Connection.their_state` to :data:`ERROR` -- see
:ref:`error-handling` for discussion.

z+Can't receive data when peer state is ERRORzReceive buffer too longi¯  )Úerror_status_hintz#peer unexpectedly closed connectionN)rƒ   r   r%   rÁ   r*   r+   r¥   rh   r   r   Úlenrm   rf   rn   ÚBaseExceptionr•   Ú
isinstancer$   Ú!_reraise_as_remote_protocol_error)rr   r<   Úexcs   &  r5   Ú
next_eventÚConnection.next_event¶  sò   € ðP ×ÑœuÓ$Ü%Ð&SÓTÐTð	Ø×4Ñ4Ó6ˆEØœY¬Ð/Ô/Ø×#Ñ# D§O¡O´T¼%ÀÓ5GÔHØœ	Ó!Ü�t×+Ñ+Ó,¨t×/NÑ/NÔNô .Ø1ÀSôð ð ×.×.Ð.ô .Ð.SÓTÐTØˆLøÜô 	Ø×Ñ §¡Ô0Ü˜#Ô1×2Ò2Ø×5Ñ5×7Ò7àûð	ús%   ¡BC Â9C ÃDÃADÄDÄDc                ó$   <€ V ^8„  d   QhRS[ RR/# )r;   r<   r=   N)r   )r?   rc   s   "€r5   r@   rd   ø  s   ø€ ÷ ñ Ñ*ð ¨tñ r4   c                ó   € R # r‡   r-   r›   s   &&r5   ÚsendÚConnection.send÷  ó   € ár4   c                óH   <€ V ^8„  d   QhRS[ S[S[S[S[S[3,          RS[/# r:   )r   r   r   r   r   r   rL   )r?   rc   s   "€r5   r@   rd   ü  s.   ø€ ÷ ñ Ù™7Ñ$9¹8ÁTÉ<ÐWÕXðá	ñr4   c                ó   € R # r‡   r-   r›   s   &&r5   rÏ   rÐ   û  s   € ñ 	r4   c                ó6   <€ V ^8„  d   QhRS[ RS[S[,          /# r:   ©r   r   rL   )r?   rc   s   "€r5   r@   rd     s   ø€ ÷ ñ ™%ð ¡H©U¥Oñ r4   c                ó   € R # r‡   r-   r›   s   &&r5   rÏ   rÐ     rÑ   r4   c                ó6   <€ V ^8„  d   QhRS[ RS[S[,          /# r:   rÕ   )r?   rc   s   "€r5   r@   rd     s   ø€ ÷ 'ñ '™%ð '¡H©U¥Oñ 'r4   c                óR   € V P                  V4      pVf   R# RP                  V4      # )aC  Convert a high-level event into bytes that can be sent to the peer,
while updating our internal state machine.

Args:
    event: The :ref:`event <events>` to send.

Returns:
    If ``type(event) is ConnectionClosed``, then returns
    ``None``. Otherwise, returns a :term:`bytes-like object`.

Raises:
    LocalProtocolError:
        Sending this event at this time would violate our
        understanding of the HTTP/1.1 protocol.

If this method raises any exception then it also sets
:attr:`Connection.our_state` to :data:`ERROR` -- see
:ref:`error-handling` for discussion.

Nr4   )Úsend_with_data_passthroughÚjoin)rr   r<   Ú	data_lists   && r5   rÏ   rÐ     s,   € ð* ×3Ñ3°EÓ:ˆ	ØÒÙà—8‘8˜IÓ&Ð&r4   c                óF   <€ V ^8„  d   QhRS[ RS[S[S[,          ,          /# r:   )r   r   r   rL   )r?   rc   s   "€r5   r@   rd      s$   ø€ ÷ ñ ±ð ¹(Á4ÉÅ;Õ:Oñ r4   c                ó~  € V P                   \        J d   \        R4      h \        V4      \        J d   V P                  V4      pV P                  pV P                  V P                  V4       \        V4      \        J d   R# Vf   Q h. pV! WP                  4       V#    T P                  T P                  4       h ; i)a@  Identical to :meth:`send`, except that in situations where
: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.

z'Can't send data when our state is ERRORN)r   r   r$   rZ   r   Ú&_clean_up_response_headers_for_sendingrk   r¥   ra   r   Úappendr•   )rr   r<   ÚwriterrÛ   s   &&  r5   rÙ   Ú%Connection.send_with_data_passthrough   s¯   € ð �>‰>œUÓ"Ü$Ð%NÓOÐOð	Ü�E‹{œhÓ&Ø×CÑCÀEÓJ�ð —\‘\ˆFØ×Ñ §¡¨uÔ5Ü�E‹{Ô.Ó.Ùð Ò)Ð)Ð)Ø)+�	Ù�u×.Ñ.Ô/Ø Ð øð	Ø×Ñ §¡Ô.Øús   ¡AB ÂB ÂB<c                ó   <€ V ^8„  d   QhRR/# r‹   r-   )r?   rc   s   "€r5   r@   rd   A  s   ø€ ÷ +ñ +˜Tñ +r4   c                ó<   € V P                  V P                  4       R# )zÁNotify the state machine that we failed to send the data it gave
us.

This causes :attr:`Connection.our_state` to immediately become
:data:`ERROR` -- see :ref:`error-handling` for discussion.

N)r•   ra   rz   s   &r5   Úsend_failedÚConnection.send_failedA  s   € ð 	×Ñ˜DŸM™MÖ*r4   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# )r;   Úresponser=   )r   )r?   rc   s   "€r5   r@   rd   Z  s   ø€ ÷ 9
ñ 9
¹xð 9
ÉHñ 9
r4   c                ó¨  € \        V4      \        J g   Q hVP                  pR p\        \        V P
                  4      pVR8X  d   Rp\        WA4      w  rVVR9   d\   \        VR. 4      pV P                  e   V P                  R8  d"   \        VR. 4      pV P
                  R8w  d   RpM\        VRR.4      pV P                  P                  '       d	   V'       dN   \        \        VR4      4      pVP                  R	4       VP                  R
4       \        VR\        V4      4      p\        VVP                   VP"                  VP$                  R7      # )FrQ   s   GETrW   rE   rU   TrV   rB   s
   keep-aliverC   )rF   r[   rD   Úreason)rX   rY   )rZ   r   rF   r   rL   rp   r^   r   ro   ri   Ú
keep_aliveÚsetr   ÚdiscardÚaddÚsortedr[   rD   ré   )rr   rç   rF   Ú
need_closeÚmethod_for_choosing_headersr¬   Ú_rH   s   &&      r5   rÞ   Ú1Connection._clean_up_response_headers_for_sendingZ  s9  € Ü�H‹~¤Ó)Ð)Ð)à×"Ñ"ˆØˆ
ô '+¬5°$×2FÑ2FÓ&GÐ#Ø&¨'Ô1Ø*0Ð'Ü'Ð(CÓN‰ˆØÐ2Ô2ô ' wÐ0AÀ2ÓFˆGØ×&Ñ&Ò.°$×2IÑ2IÈFÔ2Rô
 +¨7Ð4HÈ"ÓM�ð
 ×'Ñ'¨7Ô2Ø!%�Jøä*¨7Ð4HÈ:È,ÓW�à�|‰|×&×&Ð&¯*äÔ-¨g°}ÓEÓFˆJØ×Ñ˜}Ô-Ø�N‰N˜8Ô$Ü& w°¼vÀjÓ?QÓRˆGäØØ ×,Ñ,Ø!×.Ñ.Ø—?‘?ô	
ð 	
r4   )ri   rf   rl   rm   rn   rp   rk   rq   ra   ro   rh   r‡   )r/   r0   r1   r2   Ú__doc__Ú!DEFAULT_MAX_INCOMPLETE_EVENT_SIZErs   Úpropertyry   r   rƒ   rˆ   r�   r•   rœ   r¥   rj   rŽ   r´   rº   rÁ   rË   r	   rÏ   rÙ   rä   rÞ   r3   Ú__classdictcell__)rc   s   @r5   r)   r)   —   sG  ø‡ € ñð$ *K÷%8ò %8ðN ÷)ó ð)ð ÷2ó ð2ð ÷4ó ð4ð ÷Uó ðU÷3ð 3÷(3ð 3÷
	ð 	÷.:ð .:÷`.ð .÷,	Pò 	Pð ÷Jó ðJ÷,/ð ,/÷\ð ÷8?ð ?ðB ÷ó ðð ÷ó ðð
 ÷ó ð÷'ð '÷6ð ÷B+ð +÷29
ö 9
r4   N)r)   r*   r+   i @  )5Útypingr   r   r   r   r   r   r	   r
   r   r   Ú_eventsr   r   r   r   r   r   r   Ú_headersr   r   r   Ú_readersr   r   Ú_receivebufferr   Ú_stater   r   r   r   r   r   r    r!   r"   r#   Ú_utilr$   r%   r&   Ú_writersr'   r(   Ú__all__r*   r+   rô   rI   r^   r)   r-   r4   r5   Ú<module>r      s’   ð÷÷ ÷ ÷÷ ñ ÷ RÑ Qß *Ý )÷÷ ÷ ÷ñ ÷
 +ò 0€ô	� Hõ 	ô	ˆX õ 	ð %.Ð !õõ0 ÷t|
ó |
r4   