+
    üÐj,ª ã                   ó¸  € R t ^ RIt^ RIHtHt ^ RIt^ RIHtHtH	t	H
t
 ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ^ RI H!t! ^ RI"H#t# ^ RI$H%t%H&t&H't'H(t(H)t)H*t*H+t+ Rt, ^ RI-t-^ RI.t-^ RI/t-^ RI0t0^ RI1t1^ RI2H3t3H4t4 ^ RI5H6t6  ! R R4      t8 ! R R4      t9R3R lt:R3R lt;R t< ! R R]Pz                  4      t>]+! ]>4      t? ! R R]Pz                  4      t@]+! ]@4      tA ! R R ]@4      tB]+! ]B4      tC ! R! R"]Pz                  4      tD]+! ]D4      tE ! R# R$4      tF]+! ]F4      tG ! R% R&4      tH ! R' R(]P’                  ]H4      tJ ! R) R*]P’                  ]H4      tK ! R+ R,]P’                  ]H4      tL ! R- R.]P’                  ]H4      tM ! R/ R0]P’                  ]H4      tN ! R1 R2]P’                  4      tOR#   ]7 d    Rt, EL8i ; i)4z
Test HTTP/2 support.
N)ÚdirectlyProvidesÚ
providedBy)ÚdeferÚerrorÚreactorÚtask)ÚIPv4Address)ÚMemoryReactorClockÚStringTransport)ÚdeferToThread)Úfailure)Ú	iterbytes)ÚrequireModule)ÚDummyProducer)Ú!certificatesForAuthorityAndServer)Úunittest)Úhttp)ÚSite)ÚData)ÚDelayedHTTPHandlerÚDelayedHTTPHandlerProxyÚDummyHTTPHandlerÚDummyHTTPHandlerProxyÚDummyPullProducerHandlerProxyÚ._IDeprecatedHTTPChannelToRequestInterfaceProxyÚ_makeRequestProxyFactory)ÚDecoderÚEncoder)ÚH2ConnectionzHTTP/2 support not enabledc                   óˆ   a € ] tR t^7t o RtR tR tR t. ^3R ltRR lt	RR lt
R	 tRR
 ltRR ltRR lt. 3R ltRtV tR# )ÚFrameFactoryz˜
A class containing lots of helper methods and state to build frames. This
allows test cases to easily build correct HTTP/2 frames to feed to
hyper-h2.
c                ó$   € \        4       V n        R # ©N©r   Úencoder©Úselfs   &Ú=/usr/lib/python3/dist-packages/twisted/web/test/test_http2.pyÚ__init__ÚFrameFactory.__init__>   ó   € Ü“yˆŽó    c                ó$   € \        4       V n        R # r"   r#   r%   s   &r'   ÚrefreshEncoderÚFrameFactory.refreshEncoderA   r*   r+   c                ó   € R # )s   PRI * HTTP/2.0

SM

© r%   s   &r'   ÚclientConnectionPrefaceÚ$FrameFactory.clientConnectionPrefaceD   s   € Ù2r+   c                óL  € \         P                  P                  V4      pV P                  P	                  V4      Vn        VP                  P                  R4       V F  pVP                  P                  V4       K   	  VP                  4        F  w  rx\        WWV4       K  	  V# )zC
Builds a single valid headers frame out of the contained headers.
ÚEND_HEADERS)
Ú
hyperframeÚframeÚHeadersFramer$   ÚencodeÚdataÚflagsÚaddÚitemsÚsetattr)	r&   Úheadersr:   ÚstreamIDÚpriorityKwargsÚfÚflagÚkÚvs	   &&&&,    r'   ÚbuildHeadersFrameÚFrameFactory.buildHeadersFrameG   s‚   € ô ×Ñ×)Ñ)¨(Ó3ˆØ—‘×$Ñ$ WÓ-ˆŒØ	�‰�‰�MÔ"ÛˆDØ�G‰G�K‰K˜Öñ ð #×(Ñ(Ö*‰DˆAÜ�A˜!Öñ +ð ˆr+   Nc                óŽ   € Ve   \        V4      M	\        4       p\        P                  P                  V4      pWn        W$n        V# )z4
Builds a single data frame out of a chunk of data.
)Úsetr5   r6   Ú	DataFramer9   r:   )r&   r9   r:   r?   rA   s   &&&& r'   ÚbuildDataFrameÚFrameFactory.buildDataFrameV   s;   € ð $Ò/”�E”
´S³UˆÜ×Ñ×&Ñ& xÓ0ˆØŒØŒØˆr+   c                ó–   € \         P                  P                  ^ 4      pV'       d   VP                  P	                  R4       Wn        V# )z!
Builds a single settings frame.
ÚACK)r5   r6   ÚSettingsFramer:   r;   Úsettings)r&   rO   ÚackrA   s   &&& r'   ÚbuildSettingsFrameÚFrameFactory.buildSettingsFrame`   s7   € ô ×Ñ×*Ñ*¨1Ó-ˆßØ�G‰G�K‰K˜ÔàŒ
Øˆr+   c                óP   € \         P                  P                  V4      pW#n        V# )z%
Builds a single WindowUpdate frame.
)r5   r6   ÚWindowUpdateFrameÚwindow_increment)r&   r?   Ú	incrementrA   s   &&& r'   ÚbuildWindowUpdateFrameÚ#FrameFactory.buildWindowUpdateFramek   s%   € ô ×Ñ×.Ñ.¨xÓ8ˆØ&ÔØˆr+   c                óh   € \         P                  P                  ^ 4      pW$n        Wn        W4n        V# )z
Builds a single GOAWAY frame.
)r5   r6   ÚGoAwayFrameÚ
error_codeÚlast_stream_idÚadditional_data)r&   ÚlastStreamIDÚ	errorCodeÚadditionalDatarA   s   &&&& r'   ÚbuildGoAwayFrameÚFrameFactory.buildGoAwayFrames   s0   € ô ×Ñ×(Ñ(¨Ó+ˆØ ŒØ'ÔØ*ÔØˆr+   c                óP   € \         P                  P                  V4      pW#n        V# )z#
Builds a single RST_STREAM frame.
)r5   r6   ÚRstStreamFramer[   )r&   r?   r_   rA   s   &&& r'   ÚbuildRstStreamFrameÚ FrameFactory.buildRstStreamFrame}   s$   € ô ×Ñ×+Ñ+¨HÓ5ˆØ ŒØˆr+   c                óh   € \         P                  P                  V4      pW5n        W%n        WEn        V# )z!
Builds a single priority frame.
)r5   r6   ÚPriorityFrameÚ
depends_onÚstream_weightÚ	exclusive)r&   r?   ÚweightÚ	dependsOnrk   rA   s   &&&&& r'   ÚbuildPriorityFrameÚFrameFactory.buildPriorityFrame…   s.   € ô ×Ñ×*Ñ*¨8Ó4ˆØ ŒØ ŒØŒØˆr+   c                óæ   € \         P                  P                  V4      pW%n        V P                  P                  V4      Vn        \        V4      Vn        VP                  P                  R4       V# )z%
Builds a single Push Promise frame.
r4   )
r5   r6   ÚPushPromiseFrameÚpromised_stream_idr$   r8   r9   rH   r:   r;   )r&   r?   ÚpromisedStreamIDr>   r:   rA   s   &&&&& r'   ÚbuildPushPromiseFrameÚ"FrameFactory.buildPushPromiseFrame�   sV   € ô ×Ñ×-Ñ-¨hÓ7ˆØ/ÔØ—‘×$Ñ$ WÓ-ˆŒÜ�e“*ˆŒØ	�‰�‰�MÔ"Øˆr+   )r$   ©Né   )F)é    r+   )rx   )rx   F)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r(   r-   r1   rE   rJ   rQ   rW   ra   re   rn   rt   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r'   r    r    7   sT   ø‡ € ñò!ò!ò3ð 02¸Aô ôô	òôôôð PR÷ 	ò 	r+   r    c                   ó@   a € ] tR t^›t o RtR tR tR tR t]t	Rt
V tR# )ÚFrameBuffera¾  
A test object that converts data received from Twisted's HTTP/2 stack and
turns it into a sequence of hyperframe frame objects.

This is primarily used to make it easier to write and debug tests: rather
than have to serialize the expected frames and then do byte-level
comparison (which can be unclear in debugging output), this object makes it
possible to work with the frames directly.

It also ensures that headers are properly decompressed.
c                ó2   € \        4       V n        R V n        R# )r+   N)r   ÚdecoderÚ_datar%   s   &r'   r(   ÚFrameBuffer.__init__¨   s   € Ü“yˆŒØˆŽ
r+   c                ó8   € V ;P                   V,          un         R # r"   )r†   )r&   r9   s   &&r'   ÚreceiveDataÚFrameBuffer.receiveData¬   s   € Ø�
Š
�dÕ�
r+   c                ó   € V # r"   r0   r%   s   &r'   Ú__iter__ÚFrameBuffer.__iter__¯   s   € Øˆr+   c                óZ  € \        V P                  4      ^	8  d   \        4       h\        P                  P
                  P                  V P                  R,          4      w  r\        V P                  4      V^	,           8  d   \        4       hVP                  \        V P                  ^	^	V,            4      4       V P                  ^	V,           R V n        \        V\        P                  P                  4      '       d-   V P                  P                  VP                  RR7      Vn        V# )é	   :Nr�   NNT)Úraw)Úlenr†   ÚStopIterationr5   r6   ÚFrameÚparse_frame_headerÚ
parse_bodyÚ
memoryviewÚ
isinstancer7   r…   Údecoder9   )r&   r6   Úlengths   &  r'   ÚnextÚFrameBuffer.next²   sÑ   € Üˆt�z‰z‹?˜QÔÜ“/Ð!ä"×(Ñ(×.Ñ.×AÑAÀ$Ç*Á*ÈRÅ.ÓQ‰ˆÜˆt�z‰z‹?˜V a�ZÔ'Ü“/Ð!à×Ñœ D§J¡J¨q°1°vµ:Ð$>Ó?Ô@Ø—Z‘Z  F¥
 Ð-ˆŒ
ä�eœZ×-Ñ-×:Ñ:×;Ò;ØŸ™×,Ñ,¨U¯Z©Z¸TÐ,ÓBˆEŒJàˆr+   )r†   r…   N)ry   rz   r{   r|   r}   r(   r‰   rŒ   rš   Ú__next__r~   r   r€   s   @r'   rƒ   rƒ   ›   s%   ø‡ € ñ
òòòòð  †Hr+   rƒ   c                óê   aa€ Sf   \        4       o. pVP                  SP                  V SR7      4       VP                  VV3R lV 4       4       VR,          P                  P                  R4       V# )aª  
Provides a sequence of HTTP/2 frames that encode a single HTTP request.
This should be used when you want to control the serialization yourself,
e.g. because you want to interleave other frames with these. If that's not
necessary, prefer L{buildRequestBytes}.

@param headers: The HTTP/2 headers to send.
@type headers: L{list} of L{tuple} of L{bytes}

@param data: The HTTP data to send. Each list entry will be sent in its own
frame.
@type data: L{list} of L{bytes}

@param frameFactory: The L{FrameFactory} that will be used to construct the
frames.
@type frameFactory: L{FrameFactory}

@param streamID: The ID of the stream on which to send the request.
@type streamID: L{int}
©r>   r?   c              3   óJ   <"  € T F  pSP                  VSR 7      x € K  	  R# 5i)©r?   N)rJ   )Ú.0ÚchunkÚframeFactoryr?   s   & €€r'   Ú	<genexpr>Ú%buildRequestFrames.<locals>.<genexpr>ß   s'   øé € ð ÙKOÀ%ˆ×#Ñ# E°HÐ#×=Ð=Ë4ùs   ƒ #Ú
END_STREAMéÿÿÿÿ)r    ÚappendrE   Úextendr:   r;   ©r>   r9   r£   r?   Úframess   &&ff r'   ÚbuildRequestFramesr¬   Å   sk   ù€ ð* ÒÜ#“~ˆà€FØ
‡M�M�,×0Ñ0¸È8Ð0ÓTÔUØ
‡M�Mõ ÙKOóô ð ˆ2…J×Ñ×Ñ˜Ô&Ø€Mr+   c                óJ   € \        WW#4      pRP                  R V 4       4      # )a  
Provides the byte sequence for a collection of HTTP/2 frames representing
the provided request.

@param headers: The HTTP/2 headers to send.
@type headers: L{list} of L{tuple} of L{bytes}

@param data: The HTTP data to send. Each list entry will be sent in its own
frame.
@type data: L{list} of L{bytes}

@param frameFactory: The L{FrameFactory} that will be used to construct the
frames.
@type frameFactory: L{FrameFactory}

@param streamID: The ID of the stream on which to send the request.
@type streamID: L{int}
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   ©Ú	serialize©r¡   rA   s   & r'   r¤   Ú$buildRequestBytes.<locals>.<genexpr>ú   s   é € Ð2©6 a—K‘K—M�M«6ùó   ‚)r¬   Újoinrª   s   &&&& r'   ÚbuildRequestBytesrµ   æ   s%   € ô&   ¨|ÓF€FØ�8‰8Ñ2©6Ó2Ó2Ð2r+   c                óN   € \        4       pVP                  V 4       \        V4      # )a¶  
Given a sequence of bytes, decodes them into frames.

Note that this method should almost always be called only once, before
making some assertions. This is because decoding HTTP/2 frames is extremely
stateful, and this function doesn't preserve any of that state between
calls.

@param data: The serialized HTTP/2 frames.
@type data: L{bytes}

@returns: A list of HTTP/2 frames.
@rtype: L{list} of L{hyperframe.frame.Frame} subclasses.
)rƒ   r‰   Úlist)r9   Úbuffers   & r'   ÚframesFromBytesr¹   ý   s#   € ô ‹]€FØ
×Ñ�tÔÜ�‹<Ðr+   c                   ó.   a € ] tR tRt o RtRtR tRtV tR# )ÚChunkedHTTPHandleri  zŠ
A HTTP request object that writes chunks of data back to the network based
on the URL.

Must be called with a path /chunked/<num_chunks>
s   hello world!c                óø   € \        V P                  P                  R 4      R,          4      pV P                  ^È4       \	        V4       F  pV P                  V P                  4       K   	  V P                  4        R# )ó   /Nr§   )ÚintÚuriÚsplitÚsetResponseCodeÚrangeÚwriteÚ	chunkDataÚfinish)r&   ÚchunksÚ_s   &  r'   ÚprocessÚChunkedHTTPHandler.process  sU   € Ü�T—X‘X—^‘^ DÓ)¨"Õ-Ó.ˆØ×Ñ˜SÔ!ä�v–ˆAØ�J‰J�t—~‘~Ö&ñ ð 	�‰Žr+   r0   N)	ry   rz   r{   r|   r}   rÄ   rÈ   r~   r   r€   s   @r'   r»   r»     s   ø‡ € ñð  €I÷ð r+   r»   c                   ó<   a € ] tR tRt o RtR tR tR tR tRt	V t
R# )	ÚConsumerDummyHandleri(  zî
This is a HTTP request handler that works with the C{IPushProducer}
implementation in the L{H2Stream} object. No current IRequest object does
that, but in principle future implementations could: that codepath should
therefore be tested.
c                óž   € \         P                  P                  ! V .VO5/ VB  V P                  P	                  4        R V n        RV n        R# )FN)r   ÚRequestr(   ÚchannelÚpauseProducingÚ_requestReceivedr†   ©r&   ÚargsÚkwargss   &*,r'   r(   ÚConsumerDummyHandler.__init__0  s?   € Ü�‰×Ò˜dÐ4 TÒ4¨VÒ4ð 	�‰×#Ñ#Ô%Ø %ˆÔØˆŽ
r+   c                ó:   € V P                   P                  4        R# )z
Start the data pipe.
N)rÎ   ÚresumeProducingr%   s   &r'   Ú
acceptDataÚConsumerDummyHandler.acceptData8  s   € ð 	�‰×$Ñ$Ö&r+   c                óX   € R V n         \        P                  P                  ! V .VO5/ VB # )T)rÐ   r   rÍ   ÚrequestReceivedrÑ   s   &*,r'   rÚ   Ú$ConsumerDummyHandler.requestReceived>  s)   € Ø $ˆÔÜ�|‰|×+Ò+¨DÐB°4ÒB¸6ÑBÐBr+   c                ó¬   € V P                  ^È4       V P                  P                  4       V n        RpV P	                  V4       V P                  4        R# )éÈ   s0   this is a response from a consumer dummy handlerN)rÁ   ÚcontentÚreadr†   rÃ   rÅ   )r&   Ú
returnDatas   & r'   rÈ   ÚConsumerDummyHandler.processB  s>   € Ø×Ñ˜SÔ!Ø—\‘\×&Ñ&Ó(ˆŒ
ØHˆ
Ø�
‰
�:ÔØ�‰Žr+   )r†   rÐ   N)ry   rz   r{   r|   r}   r(   r×   rÚ   rÈ   r~   r   r€   s   @r'   rË   rË   (  s$   ø‡ € ñòò'òC÷ð r+   rË   c                   ó*   a € ] tR tRt o RtR tRtV tR# )ÚAbortingConsumerDummyHandleriM  zê
This is a HTTP request handler that works with the C{IPushProducer}
implementation in the L{H2Stream} object. The difference between this and
the ConsumerDummyHandler is that after resuming production it immediately
aborts it again.
c                ón   € V P                   P                  4        V P                   P                  4        R# )z0
Start and then immediately stop the data pipe.
N)rÎ   rÖ   ÚstopProducingr%   s   &r'   r×   Ú'AbortingConsumerDummyHandler.acceptDataU  s$   € ð 	�‰×$Ñ$Ô&Ø�‰×"Ñ"Ö$r+   r0   N)ry   rz   r{   r|   r}   r×   r~   r   r€   s   @r'   rã   rã   M  s   ø‡ € ñ÷%ð %r+   rã   c                   ó*   a € ] tR tRt o RtR tRtV tR# )ÚDummyProducerHandlerib  z…
An HTTP request handler that registers a dummy producer to serve the body.

The owner must call C{finish} to complete the response.
c                ó\   € V P                  ^È4       V P                  \        4       R4       R# )rÝ   TN)rÁ   ÚregisterProducerr   r%   s   &r'   rÈ   ÚDummyProducerHandler.processi  s"   € Ø×Ñ˜SÔ!Ø×Ñœm›o¨tÖ4r+   r0   N)ry   rz   r{   r|   r}   rÈ   r~   r   r€   s   @r'   rè   rè   b  s   ø‡ € ñ÷5ð 5r+   rè   c                   ó0   a € ] tR tRt o RtR tR tRtV tR# )ÚNotifyingRequestFactoryiq  a  
A L{http.Request} factory that calls L{http.Request.notifyFinish} on all
L{http.Request} objects before it returns them, and squirrels the resulting
L{defer.Deferred} away on the class for later use. This is done as early
as possible to ensure that we always see the result.
c                ón   € . V n         Wn        \        V P                  4       F  p\        W4       K  	  R # r"   )ÚresultsÚ_wrappedFactoryr   r   )r&   ÚwrappedFactoryÚ	interfaces   && r'   r(   Ú NotifyingRequestFactory.__init__y  s.   € ØˆŒØ-Ôô
 $ D×$8Ñ$8Ö9ˆIÜ˜TÖ-ó :r+   c                óŽ   € V P                   ! V/ VB pV P                  P                  VP                  4       4       \	        V4      # r"   )rð   rï   r¨   ÚnotifyFinishr   )r&   rÒ   rÓ   Úreqs   &*, r'   Ú__call__Ú NotifyingRequestFactory.__call__ƒ  s=   € Ø×"Ò" DÐ3¨FÑ3ˆØ�‰×Ñ˜C×,Ñ,Ó.Ô/Ü=¸cÓBÐBr+   )rð   rï   N)	ry   rz   r{   r|   r}   r(   r÷   r~   r   r€   s   @r'   rí   rí   q  s   ø‡ € ñò.÷Cð Cr+   rí   c                   ó>   a € ] tR tRt o Rt]'       d   ]tR tRtV t	R# )ÚHTTP2TestHelpersiŒ  zQ
A superclass that contains no tests but provides test helpers for HTTP/2
tests.
c                ód   € V P                  \        P                  \        VP                  4       R# )z}
Confirm that all streams are blocked: that is, the priority tree
believes that none of the streams have data ready to send.
N)ÚassertRaisesÚpriorityÚDeadlockErrorrš   )r&   Ú
connections   &&r'   ÚassertAllStreamsBlockedÚ(HTTP2TestHelpers.assertAllStreamsBlocked•  s"   € ð
 	×Ñœ(×0Ñ0´$¸
×8KÑ8KÖLr+   r0   N)
ry   rz   r{   r|   r}   ÚskipH2Úskipr   r~   r   r€   s   @r'   rú   rú   Œ  s    ø‡ € ñ÷
 Øˆ÷Mð Mr+   rú   c                   ó  a € ] tR tRt o . R'Ot. R(Ot. R)Ot. R*OtRt. R+Ot	Rt
R tR tR tR tR tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%R t&R  t'R! t(R" t)R# t*R$ t+R%t,V t-R&# ),ÚHTTP2ServerTestsi�  ó   '''
None
'''
ó$   '''
25
hello world, it's http/2!'''
c                óÞ   € \        4       p\        4       pVP                  4       pV\        W#V4      ,          pVP	                  V4       \        V4       F  pVP                  V4       K  	  WE3# )aÑ  
Takes a single L{H2Connection} object and connects it to a
L{StringTransport} using a brand new L{FrameFactory}.

@param connection: The L{H2Connection} object to connect.
@type connection: L{H2Connection}

@param headers: The headers to send on the first request.
@type headers: L{Iterable} of L{tuple} of C{(bytes, bytes)}

@param body: Chunks of body to send, if any.
@type body: L{Iterable} of L{bytes}

@return: A tuple of L{FrameFactory}, L{StringTransport}
)r    r
   r1   rµ   ÚmakeConnectionr   ÚdataReceived)r&   rÿ   r>   Úbodyr£   Ú	transportÚrequestBytesÚbytes   &&&&    r'   ÚconnectAndReceiveÚ"HTTP2ServerTests.connectAndReceiveÇ  si   € ô  $“~ˆÜ#Ó%ˆ	à#×;Ñ;Ó=ˆØÔ)¨'¸ÓFÕFˆà×!Ñ! )Ô,ä˜lÖ+ˆDØ×#Ñ# DÖ)ñ ,ð Ð&Ð&r+   c                óÂ   a a€ \        4       p\        Vn        S P                  VS P                  . 4      w  poV V3R lpVP
                  ^,          P                  V4      # )zu
Send request over a TCP connection and confirm that we get back the
expected data in the order and style we expect.
c                 óÖ  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  \
        ;QJ d#    R VR,           4       F  '       d   K   RM	  RM! R VR,           4       4      4       SP	                  \        V^,          \        P                  P                  4      4       SP	                  \        V^,          \        P                  P                  4      4       SP	                  \        V^,          \        P                  P                  4      4       SP                  \        V^,          P                  4      \        SP                  4      4       SP                  V^,          P                  SP                  4       SP                  V^,          P                  R4       SP	                  RV^,          P                  9   4       R# )é   c              3   ó>   "  € T F  qP                   ^8H  x € K  	  R# 5i©rw   N©Ú	stream_idr±   s   & r'   r¤   ÚGHTTP2ServerTests.test_basicRequest.<locals>.validate.<locals>.<genexpr>ó  ó   é € ÐE¹*°Q§¡¨qÖ 0»*ùó   ‚ºrw   NNFTr+   r¦   N)r¹   ÚvalueÚassertEqualr‘   Ú
assertTrueÚallr—   r5   r6   r7   rI   Údictr9   ÚgetResponseHeadersÚgetResponseDatar:   ©r?   r«   r&   r  s   & €€r'   ÚvalidateÚ4HTTP2ServerTests.test_basicRequest.<locals>.validateï  s7  ø€ Ü$ Y§_¡_Ó%6Ó7ˆFà×ÑœS ›[¨!Ô,Ø�O‰OŸC›CÑE¸&À¾*ÓEŸCŸCšCÑE¸&À¾*ÓEÓEÔFà�O‰OœJ v¨a¥y´*×2BÑ2B×2OÑ2OÓPÔQØ�O‰OœJ v¨a¥y´*×2BÑ2B×2LÑ2LÓMÔNØ�O‰OœJ v¨a¥y´*×2BÑ2B×2LÑ2LÓMÔNà×ÑœT &¨¥)§.¡.Ó1´4¸×8OÑ8OÓ3PÔQØ×Ñ˜V A�YŸ^™^¨T×-AÑ-AÔBØ×Ñ˜V A�YŸ^™^¨SÔ1Ø�O‰O˜L¨F°1­I¯O©OÑ;Ö<r+   )r   r   ÚrequestFactoryr  ÚgetRequestHeadersÚ_streamCleanupCallbacksÚaddCallback©r&   rÿ   rÇ   r$  r  s   f   @r'   Útest_basicRequestÚ"HTTP2ServerTests.test_basicRequestä  sV   ù€ ô "“^ˆ
Ü$9ˆ
Ô!Ø×-Ñ-¨j¸$×:PÑ:PÐRTÓU‰ˆˆ9ö	=ð ×1Ñ1°!Õ4×@Ñ@ÀÓJÐJr+   c                óÖ   a a€ \        4       p\        Vn        S P                  VS P                  S P
                  4      w  poV V3R lpVP                  ^,          P                  V4      # )zF
Send a POST request and confirm that the data is safely transferred.
c                 óÆ  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  \
        ;QJ d    R VRR  4       F  '       d   K   RM	  RM! R VRR  4       4      4       SP	                  \        VR,          \        P                  P                  4      4       SP	                  \        VR,          \        P                  P                  4      4       SP	                  \        VR	,          \        P                  P                  4      4       SP                  \        VR,          P                  4      \        SP                  4      4       SP                  VR,          P                  SP                  4       SP                  VR	,          P                  R4       SP	                  RVR	,          P                  9   4       R# )
r  c              3   ó>   "  € T F  qP                   ^8H  x € K  	  R# 5ir  r  r±   s   & r'   r¤   ÚFHTTP2ServerTests.test_postRequest.<locals>.validate.<locals>.<genexpr>  ó   é € ÐF¹+°Q§¡¨qÖ 0»+ùr  NFTr+   r¦   éýÿÿÿéþÿÿÿr§   )r¹   r  r  r‘   r  r  r—   r5   r6   r7   rI   r   r9   ÚpostResponseHeadersÚpostResponseDatar:   r#  s   & €€r'   r$  Ú3HTTP2ServerTests.test_postRequest.<locals>.validate
  s?  ø€ Ü$ Y§_¡_Ó%6Ó7ˆFð ×ÑœS ›[¨!Ô,Ø�O‰OŸC›CÑF¸&ÀÀ¹+ÓFŸCŸCšCÑF¸&ÀÀ¹+ÓFÓFÔGà�O‰OœJ v¨b¥z´:×3CÑ3C×3PÑ3PÓQÔRØ�O‰OœJ v¨b¥z´:×3CÑ3C×3MÑ3MÓNÔOØ�O‰OœJ v¨b¥z´:×3CÑ3C×3MÑ3MÓNÔOà×ÑœT &¨¥*§/¡/Ó2´D¸×9QÑ9QÓ4RÔSØ×Ñ˜V B�ZŸ_™_¨d×.CÑ.CÔDØ×Ñ˜V B�ZŸ_™_¨cÔ2Ø�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ö=r+   )r   r   r&  r  ÚpostRequestHeadersÚpostRequestDatar(  r)  r*  s   f   @r'   Útest_postRequestÚ!HTTP2ServerTests.test_postRequest   s^   ù€ ô "“^ˆ
Ü$9ˆ
Ô!Ø×-Ñ-Ø˜×/Ñ/°×1EÑ1Eó
‰ˆˆ9ö	>ð  ×1Ñ1°!Õ4×@Ñ@ÀÓJÐJr+   c                ó2  a aaa	€ . ROoRoS P                    UUu. uF  w  rVR8w  g   K  W3NK  	  ppp\        4       p\        Vn        S P	                  WCS P
                  4      w  po	VVV V	3R lpVP                  ^,          P                  V4      # u uppi )zU
Send a POST request without length and confirm that the data is safely
transferred.
ó   content-lengths&   '''
None
hello world, it's http/2!'''
c                 óž  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  \
        ;QJ d    R VRR  4       F  '       d   K   RM	  RM! R VRR  4       4      4       SP	                  \        VR,          \        P                  P                  4      4       SP	                  \        VR,          \        P                  P                  4      4       SP	                  \        VR	,          \        P                  P                  4      4       SP                  \        VR,          P                  4      \        S4      4       SP                  VR,          P                  S4       SP                  VR	,          P                  R4       SP	                  RVR	,          P                  9   4       R# )
r  c              3   ó>   "  € T F  qP                   ^8H  x € K  	  R# 5ir  r  r±   s   & r'   r¤   ÚNHTTP2ServerTests.test_postRequestNoLength.<locals>.validate.<locals>.<genexpr>:  r1  r  NFTr+   r¦   r2  r3  r§   )r¹   r  r  r‘   r  r  r—   r5   r6   r7   rI   r   r9   r:   )r?   r«   r5  r4  r&   r  s   & €€€€r'   r$  Ú;HTTP2ServerTests.test_postRequestNoLength.<locals>.validate5  s5  ø€ Ü$ Y§_¡_Ó%6Ó7ˆFð ×ÑœS ›[¨!Ô,Ø�O‰OŸC›CÑF¸&ÀÀ¹+ÓFŸCŸCšCÑF¸&ÀÀ¹+ÓFÓFÔGà�O‰OœJ v¨b¥z´:×3CÑ3C×3PÑ3PÓQÔRØ�O‰OœJ v¨b¥z´:×3CÑ3C×3MÑ3MÓNÔOØ�O‰OœJ v¨b¥z´:×3CÑ3C×3MÑ3MÓNÔOà×ÑœT &¨¥*§/¡/Ó2´DÐ9LÓ4MÔNØ×Ñ˜V B�ZŸ_™_Ð.>Ô?Ø×Ñ˜V B�ZŸ_™_¨cÔ2Ø�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ö=r+   )©ó   :statuss   200©ó   requestó   /post_endpoint©ó   commandó   POST©s   versions   HTTP/2)r<  s   38)r7  r   r   r&  r  r8  r(  r)  )
r&   ÚxÚyr7  rÿ   rÇ   r$  r5  r4  r  s
   f      @@@r'   Útest_postRequestNoLengthÚ)HTTP2ServerTests.test_postRequestNoLength  s¤   û€ ò

Ðð HÐð  $×6Ò6ô
Ù6‘t�q¸!Ð?PÑ:PŒFˆQ‹FÑ6ð 	ñ 
ô "“^ˆ
Ü$9ˆ
Ô!Ø×-Ñ-Ø¨D×,@Ñ,@ó
‰ˆˆ9÷	>ð 	>ð  ×1Ñ1°!Õ4×@Ñ@ÀÓJÐJùó5
s
   šBªBc           	     ó°  a a	a
€ ^(p\        4       p\        4       o	\        4       p\        Vn        \        \        ^V^,          ^4      4      o
S
 Uu. uF$  p\        S P                  S P                  W$4      NK&  	  ppVP                  4       p\        P                  P                  \        V!  4      pVRP                  R V 4       4      ,          pVP!                  S	4       \#        V4       F  pVP%                  V4       K  	  V	V V
3R lp\&        P(                  ! \        VP*                  P-                  4       4      4      P/                  V4      # u upi )zQ
Many interleaved POST requests all get received and responded to
appropriately.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   ©r¡   r6   s   & r'   r¤   Ú<HTTP2ServerTests.test_interleavedRequests.<locals>.<genexpr>b  ó   é € Ð GÁ°u§¡×!2Ð!2Ãùr³   c                 óÎ  <€ \        SP                  4       4      pSP                  \        V4      ^y4       S EF#  pV Uu. uFD  pVP                  V8X  g   K  \        V\        P                  P                  4      '       d   KB  VNKF  	  ppSP                  \        V4      ^4       SP                  \        V^ ,          P                  4      \        SP                  4      4       SP                  V^,          P                  SP                  4       SP                  V^,          P                  R4       SP                  RV^,          P                  9   4       EK&  	  R# u upi )rw   r+   r¦   N)r¹   r  r  r‘   r  r—   r5   r6   rT   r   r9   r4  r5  r  r:   )rï   r«   r?   rA   ÚstreamFramesÚbr&   Ú	streamIDss   &    €€€r'   r$  Ú;HTTP2ServerTests.test_interleavedRequests.<locals>.validateh  s"  ø€ Ü$ Q§W¡W£YÓ/ˆFð
 ×ÑœS ›[¨,Ô7ô &�ñ $ó á#˜Ø—{‘{ hÑ.ô ô ' q¬*×*:Ñ*:×*LÑ*L×M÷ �AÙ#ð ð  ð × Ñ ¤ \Ó!2°AÔ6à× Ñ Ü˜ a�×-Ñ-Ó.´°T×5MÑ5MÓ0Nôð × Ñ  ¨a¥×!5Ñ!5°t×7LÑ7LÔMØ× Ñ  ¨a¥×!5Ñ!5°sÔ;Ø—‘ °¸Qµ×0EÑ0EÑ E×Fó &ùò s   Á E"Á'E"ÂE")r    r
   r   r   r&  r·   rÂ   r¬   r7  r8  r1   Ú	itertoolsÚchainÚfrom_iterableÚzipr´   r	  r   r
  r   ÚDeferredListr(  Úvaluesr)  )r&   ÚREQUEST_COUNTrA   Úar?   r«   r  r  r$  rU  rV  s   f        @@r'   Útest_interleavedRequestsÚ)HTTP2ServerTests.test_interleavedRequestsG  s/  ú€ ð ˆä‹NˆÜÓˆÜ‹NˆÜ0ˆÔô œ˜q -°!Õ"3°QÓ7Ó8ˆ	ñ
 &ó	
ñ &�ô Ø×'Ñ'¨×)=Ñ)=¸qöñ &ð	 	ð 
ð ×0Ñ0Ó2ˆô —‘×.Ñ.¬s°F©|Ó<ˆØ˜Ÿ™Ñ GÁÓ GÓGÕGˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,÷	Gô6 ×!Ò!¤$ q×'@Ñ'@×'GÑ'GÓ'IÓ"JÓK×WÑWØó
ð 	
ùò[
s   Á*Ec           	     ó®  a a
€ \        4       p\        4       o
\        4       p\        Vn        S P
                  pRV^&   R Uu. uF  p\        V. W4      NK  	  ppV^ ,          ^ ,          P                  P                  R4       ^@V^ ,          ^ ,          n	        V^,          ^ ,          P                  P                  R4       ^ V^,          ^ ,          n	        VP                  ^^^RR7      pV^,          P                  ^ V4       \        P                  P                  V4      pVP                  4       pVRP!                  R V 4       4      ,          pVP#                  S
4       \%        V4       F  pVP'                  V4       K  	  V
V 3R lp	\(        P*                  ! \-        VP.                  P1                  4       4      4      P3                  V	4      # u upi )	zB
Data in responses is interleaved according to HTTP/2 priorities.
ÚPRIORITYT)r?   rl   rm   rk   r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   rP  s   & r'   r¤   Ú@HTTP2ServerTests.test_sendAccordingToPriority.<locals>.<genexpr>¶  rR  r³   c                 ó2  <€ \        SP                  4       4      pSP                  \        V4      ^4       V Uu. uF;  p\	        V\
        P                  P                  4      '       g   K/  VP                  NK=  	  pp. ROpSP                  W44       R# u upi )é   N)rw   é   rw   rw   rh  rw   rw   rh  é   rh  ri  rh  ri  ri  ri  )	r¹   r  r  r‘   r—   r5   r6   rI   r  )rï   r«   rA   rV  ÚexpectedOrderrU  r&   s   &    €€r'   r$  Ú?HTTP2ServerTests.test_sendAccordingToPriority.<locals>.validate½  s}   ø€ Ü$ Q§W¡W£YÓ/ˆFð ×ÑœS ›[¨"Ô-ñ &,óÙ%+ ¬z¸!¼Z×=MÑ=M×=WÑ=W×/X”�—”¡Vð ð ò JˆMØ×Ñ˜YÖ6ùò	s   º,BÁ+B)z:pathz
/chunked/4)rw   rh  ri  )r    r
   r   ÚChunkedHTTPHandlerProxyr&  r'  r¬   r:   r;   rj   rn   ÚinsertrX  rY  rZ  r1   r´   r	  r   r
  r   r\  r·   r(  r]  r)  )r&   rA   r_  r'  r?   r«   ÚpriorityFramer  r  r$  rU  s   f         @r'   Útest_sendAccordingToPriorityÚ-HTTP2ServerTests.test_sendAccordingToPriority‡  s�  ù€ ô" ‹NˆÜÓˆÜ‹NˆÜ2ˆÔØ ×2Ñ2ÐØ6Ð˜!Ññ &ó
á%�ô Ð0°"°aÖBÙ%ð 	ð 
ð 	ˆq�	�!�×Ñ×Ñ˜zÔ*Ø%'ˆˆq�	�!�Ô"àˆq�	�!�×Ñ×Ñ˜zÔ*Ø%'ˆˆq�	�!�Ô"à×,Ñ,ØØØØð	 -ó 
ˆð 	ˆq�	×Ñ˜˜MÔ*ä—‘×.Ñ.¨vÓ6ˆØ×0Ñ0Ó2ˆØ˜Ÿ™Ñ GÁÓ GÓGÕGˆà	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ö	7ô ×!Ò!¤$ q×'@Ñ'@×'GÑ'GÓ'IÓ"JÓK×WÑWØó
ð 	
ùòW
s   ÁGc                ó¾  € \        4       p\        4       p\        4       p\        Vn        VP                  4       pV\        V P                  . V4      ,          pWAP                  ^^V P                  R.R7      P                  4       ,          pVP                  V4       \        V4       F(  pVP                  V4       VP                  '       g   K(   M	  \        VP                  4       4      pV P!                  \#        V4      ^4       V P%                  \'        VR,          \(        P*                  P,                  4      4       V P%                  VP                  4       R# )zB
A protocol error from the remote peer terminates the connection.
r4   )r?   rs   r>   r:   Nr§   )r    r
   r   r   r&  r1   rµ   r'  rt   r°   r	  r   r
  Údisconnectingr¹   r  r  r‘   r  r—   r5   r6   rZ   )r&   rA   rU  r_  r  r  r«   s   &      r'   Ú&test_protocolErrorTerminatesConnectionÚ7HTTP2ServerTests.test_protocolErrorTerminatesConnectionÎ  s  € ô ‹NˆÜÓˆÜ‹NˆÜ0ˆÔð ×0Ñ0Ó2ˆØÔ)¨$×*@Ñ*@À"ÀaÓHÕHˆØ×/Ñ/ØØØ×*Ñ*Ø �/ð	 0ó 
÷
 ‰)‹+õ	ˆð 	
×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ô ð ��ŠÙñ ,ô ! §¡£Ó+ˆð
 	×Ñœ˜V› aÔ(Ø�‰œ
 6¨"¥:¬z×/?Ñ/?×/KÑ/KÓLÔMØ�‰˜Ÿ™Ö(r+   c                ó¸  a a€ \        4       p\        Vn        S P                  VS P                  S P
                  4      w  poVP                  ^,          P                  P                  pS P                  VP                  4       \        SP                  4       4      pS P                  \        V4      ^4       VP                  4        S P!                  VP                  4       S P!                  VP"                  R4       \        SP                  4       4      pS P                  \        V4      ^4       V V3R lpVP$                  ^,          P'                  V4      # )zƒ
The H2Stream data implements IPushProducer, and can have its data
production controlled by the Request if the Request chooses to.
s   hello world, it's http/2!c                 óº   <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  RVR,          P
                  9   4       R# ©r  r¦   Nr§   ©r¹   r  r  r‘   r  r:   r#  s   & €€r'   r$  Ú;HTTP2ServerTests.test_streamProducingData.<locals>.validate  sE   ø€ ä$ Y§_¡_Ó%6Ó7ˆFð ×ÑœS ›[¨!Ô,Ø�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ö=r+   )r   ÚConsumerDummyHandlerProxyr&  r  r7  r8  ÚstreamsÚ_requestÚoriginalÚassertFalserÐ   r¹   r  r  r‘   r×   r  r†   r(  r)  )r&   rÿ   rÇ   Úrequestr«   r$  r  s   f     @r'   Útest_streamProducingDataÚ)HTTP2ServerTests.test_streamProducingDataõ  s  ù€ ô
 "“^ˆ
Ü$=ˆ
Ô!Ø×-Ñ-Ø˜×/Ñ/°×1EÑ1Eó
‰ˆˆ9ð ×$Ñ$ QÕ'×0Ñ0×9Ñ9ˆØ×Ñ˜×1Ñ1Ô2ô
 ! §¡Ó!2Ó3ˆØ×Ñœ˜V› aÔ(ð
 	×ÑÔØ�‰˜×0Ñ0Ô1Ø�‰˜Ÿ™Ð'CÔDô
 ! §¡Ó!2Ó3ˆØ×Ñœ˜V› aÔ(ö	>ð ×1Ñ1°!Õ4×@Ñ@ÀÓJÐJr+   c                ó†  a a	€ \        4       p\        4       o	\        4       p\        Vn        \        S P                  S P                  V4      p\        4       VR,          n	        VP                  4       pVRP                  R V 4       4      ,          pVP                  S	4       \        V4       F  pVP                  V4       K  	  VP                  ^,          P                   P"                  pS P%                  VP&                  4       VP(                  ^,          pVP+                  4        V	V 3R lpVP-                  V4      # )zÑ
The H2Stream data implements IPushProducer, and can have its data
production controlled by the Request if the Request chooses to.
When the production is stopped, that causes the stream connection to
be lost.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚAHTTP2ServerTests.test_abortStreamProducingData.<locals>.<genexpr>2  ó   é € Ð ?¹°1§¡§ »ùr³   c                 ó*  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  \        VR,          \        P                  P                  4      4       SP                  VR,          P                  ^4       R# )é   Nr§   )
r¹   r  r  r‘   r  r—   r5   r6   rd   r  )r?   r«   rU  r&   s   & €€r'   r$  Ú@HTTP2ServerTests.test_abortStreamProducingData.<locals>.validateE  sf   ø€ ä$ Q§W¡W£YÓ/ˆFð ×ÑœS ›[¨!Ô,Ø�O‰OœJ v¨b¥z´:×3CÑ3C×3RÑ3RÓSÔTØ×Ñ˜V B�Z×1Ñ1°1Ö5r+   r§   )r    r
   r   Ú!AbortingConsumerDummyHandlerProxyr&  r¬   r7  r8  rH   r:   r1   r´   r	  r   r
  r{  r|  r}  r~  rÐ   r(  r×   r)  )
r&   rA   r_  r«   r  r  r  ÚcleanupCallbackr$  rU  s
   f        @r'   Útest_abortStreamProducingDataÚ.HTTP2ServerTests.test_abortStreamProducingData"  s  ù€ ô ‹NˆÜÓˆÜ‹NˆÜ<ˆÔô $ D×$;Ñ$;¸T×=QÑ=QÐSTÓUˆÜ›5ˆˆr�
ÔØ×0Ñ0Ó2ˆØ˜Ÿ™Ñ ?¹Ó ?Ó?Õ?ˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð
 —)‘)˜A•,×'Ñ'×0Ñ0ˆØ×Ñ˜×1Ñ1Ô2ð ×3Ñ3°AÕ6ˆð 	×ÑÔö	6ð ×*Ñ*¨8Ó4Ð4r+   c                óJ  a a€ \        4       p\        Vn        S P                  VS P                  . 4      w  poVP
                  ^,          P                  P                  pVP                  R4       VP                  R4       VP                  ^,          pVP                  VP                  ^^R7      P                  4       4       S P                  VP                  4       S P                  VP                  RJ 4       VP                  R4       V V3R lpVP!                  V4      # )z“
When a RstStream frame is received, the L{H2Connection} and L{H2Stream}
objects tear down the L{http.Request} and swallow all outstanding
writes.
ó   first chunkó   second chunk)r_   Ns   third chunkc                 ó*  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP                  V^,          P                  ^4       SP                  \        V^,          \        P                  P                  4      4       R# ©r‡  N©
r¹   r  r  r‘   r  r  r—   r5   r6   r7   r#  s   & €€r'   r$  Ú9HTTP2ServerTests.test_terminatedRequest.<locals>.validate{  óe   ø€ Ü$ Y§_¡_Ó%6Ó7ˆFà×ÑœS ›[¨!Ô,Ø×Ñ˜V A�Y×0Ñ0°!Ô4à�O‰OœJ v¨a¥y´*×2BÑ2B×2OÑ2OÓPÖQr+   )r   ÚDummyProducerHandlerProxyr&  r  r'  r{  r|  r}  rÃ   r(  r
  re   r°   r  Ú_disconnectedrÎ   r)  ©r&   rÿ   r£   r  rŠ  r$  r  s   f     @r'   Útest_terminatedRequestÚ'HTTP2ServerTests.test_terminatedRequestP  sü   ù€ ô "“^ˆ
Ü$=ˆ
Ô!Ø"&×"8Ñ"8Ø˜×.Ñ.°ó#
Ñˆ�ið
 ×$Ñ$ QÕ'×0Ñ0×9Ñ9ˆð 	�‰�nÔ%Ø�‰�oÔ&ð %×<Ñ<¸QÕ?ˆð 	×ÑØ×,Ñ,¨Q¸!Ð,Ó<×FÑFÓHô	
ð
 	�‰˜×-Ñ-Ô.Ø�‰˜Ÿ™¨4Ð/Ô0ð 	�‰�nÔ%ö	Rð ×*Ñ*¨8Ó4Ð4r+   c                ó\  a a€ \        4       p\        Vn        S P                  VS P                  . 4      w  poVP
                  ^,          P                  P                  pVP                  R4       VP                  R4       VP                  ^,          pVP                  VP                  ^ R7      P                  4       4       S P                  VP                  4       S P                  VP                  RJ 4       S P!                  VP"                  4       V V3R lpVP%                  V4      # )z–
When a GoAway frame is received, the L{H2Connection} and L{H2Stream}
objects tear down all outstanding L{http.Request} objects and stop all
writing.
rŽ  r�  ©r^   Nc                 ó*  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP                  V^,          P                  ^4       SP                  \        V^,          \        P                  P                  4      4       R# r‘  r’  r#  s   & €€r'   r$  Ú<HTTP2ServerTests.test_terminatedConnection.<locals>.validate¯  r”  r+   )r   r•  r&  r  r'  r{  r|  r}  rÃ   r(  r
  ra   r°   r  r–  rÎ   r~  Ú_stillProducingr)  r—  s   f     @r'   Útest_terminatedConnectionÚ*HTTP2ServerTests.test_terminatedConnection…  s  ù€ ô "“^ˆ
Ü$=ˆ
Ô!Ø"&×"8Ñ"8Ø˜×.Ñ.°ó#
Ñˆ�ið
 ×$Ñ$ QÕ'×0Ñ0×9Ñ9ˆð 	�‰�nÔ%Ø�‰�oÔ&ð %×<Ñ<¸QÕ?ˆð 	×ÑØ×)Ñ)°qÐ)Ó9×CÑCÓEô	
ð
 	�‰˜×-Ñ-Ô.Ø�‰˜Ÿ™¨4Ð/Ô0ð 	×Ñ˜×3Ñ3Ô4ö	Rð ×*Ñ*¨8Ó4Ð4r+   c                óÔ   a a€ \        4       p\        Vn        S P                  R.,           pS P	                  W. 4      w  poV V3R lpVP
                  ^,          P                  V4      # )zY
Requests containing Expect: 100-continue cause provisional 100
responses to be emitted.
c                 ó  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  \
        ;QJ d#    R VR,           4       F  '       d   K   RM	  RM! R VR,           4       4      4       SP	                  \        V^,          \        P                  P                  4      4       SP                  V^,          P                  R.4       SP	                  RVR,          P                  9   4       R# )	ri  c              3   ó>   "  € T F  qP                   ^8H  x € K  	  R# 5ir  r  r±   s   & r'   r¤   ÚQHTTP2ServerTests.test_respondWith100Continue.<locals>.validate.<locals>.<genexpr>Í  r  r  r  FTr¦   N)rB  s   100r§   )r¹   r  r  r‘   r  r  r—   r5   r6   r7   r9   r:   r#  s   & €€r'   r$  Ú>HTTP2ServerTests.test_respondWith100Continue.<locals>.validateÉ  s±   ø€ Ü$ Y§_¡_Ó%6Ó7ˆFà×ÑœS ›[¨!Ô,Ø�O‰OŸC›CÑE¸&À¾*ÓEŸCŸCšCÑE¸&À¾*ÓEÓEÔFà�O‰OœJ v¨a¥y´*×2BÑ2B×2OÑ2OÓPÔQØ×Ñ˜V A�YŸ^™^Ð.BÐ-CÔDØ�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ö=r+   )s   expects   100-continue)r   r   r&  r'  r  r(  r)  )r&   rÿ   r>   rÇ   r$  r  s   f    @r'   Útest_respondWith100ContinueÚ,HTTP2ServerTests.test_respondWith100Continue¹  sc   ù€ ô
 "“^ˆ
Ü$9ˆ
Ô!ð ×(Ñ(Ð,HÐ+IÕIˆà×-Ñ-¨jÀ2ÓF‰ˆˆ9ö
	>ð ×1Ñ1°!Õ4×@Ñ@ÀÓJÐJr+   c                ó¨  a a€ \        4       p\        Vn        S P                  VS P                  . 4      w  poVP
                  ^,          pVP                  P                  pVP                  ^,          pVP                  4        S P                  VP                  4       S P                  VP                  RJ 4       V V3R lpVP                  V4      # )z”
Triggering the call to L{H2Stream._respondToBadRequestAndDisconnect}
leads to a 400 error being sent automatically and the stream being torn
down.
Nc                 óv  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  \        V^,          \        P                  P                  4      4       SP                  V^,          P                  R.4       SP	                  RVR,          P                  9   4       R# )r‡  r¦   N)rB  s   400r§   )r¹   r  r  r‘   r  r—   r5   r6   r7   r9   r:   r#  s   & €€r'   r$  Ú6HTTP2ServerTests.test_respondWith400.<locals>.validateñ  s‚   ø€ Ü$ Y§_¡_Ó%6Ó7ˆFà×ÑœS ›[¨!Ô,à�O‰OœJ v¨a¥y´*×2BÑ2B×2OÑ2OÓPÔQØ×Ñ˜V A�YŸ^™^Ð.BÐ-CÔDØ�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ö=r+   )r   r•  r&  r  r'  r{  r|  r}  r(  Ú!_respondToBadRequestAndDisconnectr  r–  rÎ   r)  )r&   rÿ   rÇ   Ústreamr  rŠ  r$  r  s   f      @r'   Útest_respondWith400Ú$HTTP2ServerTests.test_respondWith400Õ  s³   ù€ ô "“^ˆ
Ü$=ˆ
Ô!Ø×-Ñ-¨j¸$×:PÑ:PÐRTÓU‰ˆˆ9ð ×#Ñ# AÕ&ˆØ—/‘/×*Ñ*ˆØ$×<Ñ<¸QÕ?ˆð 	×0Ñ0Ô2ð 	�‰˜×-Ñ-Ô.Ø�‰˜Ÿ™¨4Ð/Ô0ö	>ð ×*Ñ*¨8Ó4Ð4r+   c                ót  a aa€ \        4       p\        Vn        S P                  VS P                  . 4      w  poVP
                  ^,          pVP                  P                  p. ROoS F  pVP                  V4       K  	  VP                  4        VV V3R lpVP                  ^,          P                  V4      # )z„
Calling L{Request.loseConnection} causes all data that has previously
been sent to be flushed, and then the stream cleanly closed.
c                 óœ  <€ \        SP                  4       4      pSP                  \        V4      ^	4       SP	                  \
        ;QJ d#    R VR,           4       F  '       d   K   RM	  RM! R VR,           4       4      4       SP	                  \        V^,          \        P                  P                  4      4       SP	                  RVR,          P                  9   4       V Uu. uF;  p\        V\        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  VSR.,           4       R# u upi )	r�   c              3   ó>   "  € T F  qP                   ^8H  x € K  	  R# 5ir  r  r±   s   & r'   r¤   ÚQHTTP2ServerTests.test_loseH2StreamConnection.<locals>.validate.<locals>.<genexpr>  r  r  r  FTr¦   r+   Nr§   ©r¹   r  r  r‘   r  r  r—   r5   r6   r7   r:   rI   r9   )r?   r«   rA   ÚreceivedDataChunksÚ
dataChunksr&   r  s   &   €€€r'   r$  Ú>HTTP2ServerTests.test_loseH2StreamConnection.<locals>.validate  sò   ø€ Ü$ Y§_¡_Ó%6Ó7ˆFð ×ÑœS ›[¨!Ô,Ø�O‰OŸC›CÑE¸&À¾*ÓEŸCŸCšCÑE¸&À¾*ÓEÓEÔFà�O‰OœJ v¨a¥y´*×2BÑ2B×2OÑ2OÓPÔQØ�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'ó"Ù &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð "ð ×ÑØ"Ø˜c˜UÕ"öùò"s   Ã*,E	ÄE	)ó   helloó   worldó   hereó   areó   someó   writes)r   r•  r&  r  r'  r{  r|  r}  rÃ   ÚloseConnectionr(  r)  )	r&   rÿ   rÇ   r¬  r  r¢   r$  rµ  r  s	   f      @@r'   Útest_loseH2StreamConnectionÚ,HTTP2ServerTests.test_loseH2StreamConnectionü  s£   ú€ ô "“^ˆ
Ü$=ˆ
Ô!Ø×-Ñ-¨j¸$×:PÑ:PÐRTÓU‰ˆˆ9ð ×#Ñ# AÕ&ˆØ—/‘/×*Ñ*ˆò Oˆ
ÛˆEØ�M‰M˜%Ö ñ  ð 	×ÑÔ ÷	ð$ ×1Ñ1°!Õ4×@Ñ@ÀÓJÐJr+   c                óþ   € \        4       p\        Vn        V P                  WP                  . 4       VP
                  ^,          pVP                  P                  pV P                  \        VP                  VR4       R# )z;
The L{H2Stream} object forbids registering two producers.
TN)r   r•  r&  r  r'  r{  r|  r}  rü   Ú
ValueErrorrê   )r&   rÿ   r¬  r  s   &   r'   Útest_cannotRegisterTwoProducersÚ0HTTP2ServerTests.test_cannotRegisterTwoProducers)  sd   € ô "“^ˆ
Ü$=ˆ
Ô!Ø×Ñ˜z×+AÑ+AÀ2ÔFð ×#Ñ# AÕ&ˆØ—/‘/×*Ñ*ˆà×Ñœ* f×&=Ñ&=¸wÈÖMr+   c                ól  a aa€ \        4       p\        Vn        S P                  VS P                  . 4      w  poVP
                  ^,          pVP                  P                  oSP                  P                  pVP                  V3R l4       V V3R lpVP                  ^,          P                  V4      # )zt
L{Request} objects that have registered pull producers get blocked and
unblocked according to HTTP/2 flow control.
c                 ó$   <€ SP                  4       # r"   )rÅ   )rJ  r  s   &€r'   Ú<lambda>Ú;HTTP2ServerTests.test_handlesPullProducer.<locals>.<lambda>E  s   ø€ ¨w¯~©~Ô/?r+   c                 óD  <€ \        SP                  4       4      pSP                  R VR,          P                  9   4       V Uu. uF;  p\	        V\
        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  V. RO4       R# u upi )r¦   Nr§   )ó   0ó   1ó   2ó   3ó   4ó   5ó   6ó   7ó   8ó   9r+   ©
r¹   r  r  r:   r—   r5   r6   rI   r9   r  ©r?   r«   rA   rµ  r&   r  s   &   €€r'   r$  Ú;HTTP2ServerTests.test_handlesPullProducer.<locals>.validateH  s…   ø€ Ü$ Y§_¡_Ó%6Ó7ˆFð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'óÙ &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð ð ×ÑØÚQöùòó   Á,BÁ5B)r   r   r&  r  r'  r{  r|  r}  Ú_actualProducerÚresultr)  r(  )r&   rÿ   rÇ   r¬  ÚproducerCompleter$  r  r  s   f     @@r'   Útest_handlesPullProducerÚ)HTTP2ServerTests.test_handlesPullProducer7  s˜   ú€ ô
 "“^ˆ
Ü$Aˆ
Ô!Ø×-Ñ-¨j¸$×:PÑ:PÐRTÓU‰ˆˆ9ð ×#Ñ# AÕ&ˆØ—/‘/×*Ñ*ˆØ"×2Ñ2×9Ñ9ÐØ×$Ñ$Ô%?Ô@ö	ð ×1Ñ1°!Õ4×@Ñ@ÀÓJÐJr+   c                ó6  € \        4       p\        Vn        V P                  WP                  . 4       VP
                  ^,          P                  P                  pV P                  VP                  4       4       VP
                  ^,          P                  4        R# )z:
L{Request} objects can correctly ask isSecure on HTTP/2.
N)r   r   r&  r  r'  r{  r|  r}  r~  ÚisSecureÚabortConnection)r&   rÿ   r  s   &  r'   Útest_isSecureWorksProperlyÚ+HTTP2ServerTests.test_isSecureWorksProperlyY  ss   € ô "“^ˆ
Ü$;ˆ
Ô!Ø×Ñ˜z×+AÑ+AÀ2ÔFà×$Ñ$ QÕ'×0Ñ0×9Ñ9ˆØ×Ñ˜×)Ñ)Ó+Ô,Ø×Ñ˜1Õ×-Ñ-Ö/r+   c                óR  a a€ \        4       p\        Vn        S P                  VS P                  . 4      w  poVP
                  ^,          P                  P                  p\        P                  ! RVP                  4       V V3R lpVP                  ^,          P                  V4      # )z<
L{H2Connection} correctly unblocks when a stream is ended.
ç{®Gáz„?c                  óº   <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  RVR,          P
                  9   4       R# )rh  r¦   Nr§   rx  )rÒ   r«   r&   r  s   * €€r'   ÚvalidateCompleteÚCHTTP2ServerTests.test_lateCompletionWorks.<locals>.validateCompleter  sE   ø€ Ü$ Y§_¡_Ó%6Ó7ˆFð ×ÑœS ›[¨!Ô,Ø�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ö=r+   )r   r   r&  r  r'  r{  r|  r}  r   Ú	callLaterrÅ   r(  r)  )r&   rÿ   rÇ   r  rä  r  s   f    @r'   Útest_lateCompletionWorksÚ)HTTP2ServerTests.test_lateCompletionWorkse  s‰   ù€ ô "“^ˆ
Ü$;ˆ
Ô!Ø×-Ñ-¨j¸$×:PÑ:PÐRTÓU‰ˆˆ9ð ×$Ñ$ QÕ'×0Ñ0×9Ñ9ˆÜ×Ò˜$ §¡Ô/ö	>ð ×1Ñ1°!Õ4×@Ñ@ÐAQÓRÐRr+   c                ó€  a a€ \        4       p\        Vn        S P                  VS P                  . 4      w  poVP
                  ^,          pVP                  P                  pVP                  ^È4       VP                  . RO4       VP                  4        VP                  ^,          pV V3R lpVP                  V4      # )zG
L{H2Stream} objects can send a series of frames via C{writeSequence}.
c                 óD  <€ \        SP                  4       4      pSP                  R VR,          P                  9   4       V Uu. uF;  p\	        V\
        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  V. RO4       R# u upi )r¦   Nr§   )ó   Helloó   ,ó   world!r+   rÓ  rÔ  s   &   €€r'   r$  Ú@HTTP2ServerTests.test_writeSequenceForChannels.<locals>.validateŒ  s‚   ø€ Ü$ Y§_¡_Ó%6Ó7ˆFð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'óÙ &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð ð ×Ñ˜ZÒ)IÖJùòrÖ  )rë  rì  rí  )r   r   r&  r  r'  r{  r|  r}  rÁ   ÚwriteSequencerÅ   r(  r)  )r&   rÿ   rÇ   r¬  r  ÚcompletionDeferredr$  r  s   f      @r'   Útest_writeSequenceForChannelsÚ.HTTP2ServerTests.test_writeSequenceForChannels{  s£   ù€ ô "“^ˆ
Ü$;ˆ
Ô!Ø×-Ñ-¨j¸$×:PÑ:PÐRTÓU‰ˆˆ9à×#Ñ# AÕ&ˆØ—/‘/×*Ñ*ˆà×Ñ Ô$Ø×ÑÒ8Ô9Ø�‰Ôà'×?Ñ?ÀÕBÐö
	Kð "×-Ñ-¨hÓ7Ð7r+   c                óú  a aaa	a
a€ \        4       o
\        4       o\        4       o\        Sn        S
P                  4       pVS
P                  \        P                  P                  P                  ^/4      P                  4       ,          pV\        S P                  . S
4      ,          pSP                  S4       \        V4       F  pSP!                  V4       K  	  SP"                  ^,          pVP$                  P&                  oSP)                  R4       . ROo	V	V3R lp\*        P,                  ! \.        RV4      pVP1                  VV
3R l4       VV	V 3R lpSP2                  ^,          P1                  V4      # )z´
Delaying writes from L{Request} causes the L{H2Connection} to block on
sending until data is available. However, data is *not* sent if there's
no room in the flow control window.
ó   fiverc                  ó\   <€ S F  p SP                  V 4       K  	  SP                  4        R # r"   )rÃ   rÅ   )r¢   rµ  r  s    €€r'   Úwrite_chunksÚ7HTTP2ServerTests.test_delayWrites.<locals>.write_chunks¹  s#   ø€ ã#�Ø—‘˜eÖ$ñ $à�N‰NÖr+   râ  c                  ód   <€ SP                  SP                  ^^2R7      P                  4       4      # )rw   ©r?   rV   )r
  rW   r°   )rÒ   r_  rA   s   *€€r'   rÆ  Ú3HTTP2ServerTests.test_delayWrites.<locals>.<lambda>Á  s*   ø€ ˜!Ÿ.™.Ø×(Ñ(°!¸rÐ(ÓB×LÑLÓNôr+   c                 ó¬  <€ \        SP                  4       4      pSP                  \        V4      ^	4       SP	                  \
        ;QJ d#    R VR,           4       F  '       d   K   RM	  RM! R VR,           4       4      4       SP	                  \        V^,          \        P                  P                  4      4       SP	                  RVR	,          P                  9   4       V Uu. uF;  p\        V\        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  VR.S,           R.,           4       R# u upi )
r�   c              3   ó>   "  € T F  qP                   ^8H  x € K  	  R# 5ir  r  r±   s   & r'   r¤   ÚFHTTP2ServerTests.test_delayWrites.<locals>.validate.<locals>.<genexpr>Í  r  r  :r‡  NNFTr¦   rô  r+   Nr§   r³  )r?   r«   rA   r´  rU  rµ  r&   s   &   €€€r'   r$  Ú3HTTP2ServerTests.test_delayWrites.<locals>.validateÈ  sø   ø€ Ü$ Q§W¡W£YÓ/ˆFð ×ÑœS ›[¨!Ô,Ø�O‰OŸC›CÑE¸&À¾*ÓEŸCŸCšCÑE¸&À¾*ÓEÓEÔFà�O‰OœJ v¨a¥y´*×2BÑ2B×2OÑ2OÓPÔQØ�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'ó"Ù &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð "ð ×ÑØ"Ø�
˜ZÕ'¨3¨%Õ/öùò"s   Ã*,EÄE)r¹  rº  r»  r¼  )r    r
   r   r   r&  r1   rQ   Úh2rO   ÚSettingCodesÚINITIAL_WINDOW_SIZEr°   rµ   r'  r	  r   r
  r{  r|  r}  rÃ   r   Ú
deferLaterr   r)  r(  )r&   r  r  r¬  rö  Údr$  r_  rU  rµ  rA   r  s   f      @@@@@r'   Útest_delayWritesÚ!HTTP2ServerTests.test_delayWritesš  s*  ý€ ô ‹NˆÜÓˆÜ‹NˆÜ2ˆÔà×0Ñ0Ó2ˆØ˜×,Ñ,Ü�[‰[×%Ñ%×9Ñ9¸1Ð=ó
ç
‰)‹+õ	ˆð 	Ô)¨$×*@Ñ*@À"ÀaÓHÕHˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð —‘˜1•ˆØ—/‘/×*Ñ*ˆð 	�‰�hÔÚ:ˆ
ö	ô �OŠOœG T¨<Ó8ˆØ	�‰õô	
÷	ð$ ×(Ñ(¨Õ+×7Ñ7¸ÓAÐAr+   c                óæ  € \        4       p\        4       p\        4       p\        Vn        VP                  4       pV\        V P                  . VR7      ,          pWAP                  ^R7      P                  4       ,          pVP                  V4       VP                  V4       \        VP                  4       4      pV P                  \        V4      ^4       V P!                  ^VP"                  4       R# )z]
A client that immediately resets after sending the body causes Twisted
to send no response.
©r>   r9   r£   r    N)r    r
   r   r   r&  r1   rµ   r'  re   r°   r	  r
  r¹   r  r  r‘   ÚassertNotInr(  )r&   r£   r  r_  r  r«   s   &     r'   Útest_resetAfterBodyÚ$HTTP2ServerTests.test_resetAfterBodyÜ  sÅ   € ô
 $“~ˆÜ#Ó%ˆ	Ü‹NˆÜ0ˆÔà#×;Ñ;Ó=ˆØÔ)Ø×*Ñ*°À,ô
õ 	
ˆð 	×8Ñ8À!Ð8ÓD×NÑNÓPÕPˆØ	×Ñ˜Ô#Ø	�‰�|Ô$ä  §¡Ó!2Ó3ˆà×Ñœ˜V› aÔ(Ø×Ñ˜˜A×5Ñ5Ö6r+   c                ó   a aa€ \         P                  ! 4       o ! V3R lR\        4      p\        4       o\        P
                  ! 4       p\        V4      Sn        VSn        \        4       Sn
        S P                  SS P                  . 4       VV 3R lpSP                  V4       SP                  ^,          p\         P                  ! SV.4      # )zi
A custom L{Request} subclass that requires the site and factory in the
constructor is able to get them.
c                   ó.   <a € ] tR tRt o V3R ltRtV tR# )ÚTHTTP2ServerTests.test_RequestRequiringFactorySiteInConstructor.<locals>.SuperRequestiú  c                ó²   <€ \         P                  ! V .VO5/ VB  SP                  V P                  P                  V P                  P
                  34       R # r"   )r   r(   ÚcallbackrÎ   ÚsiteÚfactory)r&   rÒ   rÓ   r  s   &*,€r'   r(   Ú]HTTP2ServerTests.test_RequestRequiringFactorySiteInConstructor.<locals>.SuperRequest.__init__û  s@   ø€ Ü ×)Ò)¨$Ð@°Ò@¸Ò@Ø—
‘
˜DŸL™L×-Ñ-¨t¯|©|×/CÑ/CÐDÖEr+   r0   N)ry   rz   r{   r|   r(   r~   r   )r�   r  s   @€r'   ÚSuperRequestr  ú  s   ù‡ € ÷Fó Fr+   r  c                 ó€   <€ V w  rSP                  VSP                  4       SP                  VSP                  4       R # r"   )ÚassertIsr  r  )rÒ   r  r  rÿ   r&   s   &  €€r'   ÚvalidateFactoryAndSiteÚ^HTTP2ServerTests.test_RequestRequiringFactorySiteInConstructor.<locals>.validateFactoryAndSite	  s0   ø€ Ø ‰MˆDØ�M‰M˜$ 
§¡Ô0Ø�M‰M˜' :×#5Ñ#5Ö6r+   )r   ÚDeferredr   r   r   ÚHTTPFactoryr   r&  r  Úobjectr  r  r'  r)  r(  ÚgatherResults)r&   r  ÚhttpFactoryr  rŠ  rÿ   r  s   f    @@r'   Ú-test_RequestRequiringFactorySiteInConstructorÚ>HTTP2ServerTests.test_RequestRequiringFactorySiteInConstructoró  s«   ú€ ô
 �NŠNÓˆ÷	FÔ+ô 	Fô
 "“^ˆ
Ü×&Ò&Ó(ˆÜ$<¸\Ó$Jˆ
Ô!ð )ˆ
ÔÜ ›(ˆ
Œà×Ñ˜z¨4×+AÑ+AÀ2ÔFö	7ð
 	
�‰Ð,Ô-ð %×<Ñ<¸QÕ?ˆÜ×"Ò" A Ð#7Ó8Ð8r+   c                ót  a € \        4       p\        \        4      Vn        S P	                  VS P
                  . 4      w  r#VP                  P                  pS P                  \        V4      ^4       V 3R lpV^ ,          pVP                  V4       VP                  ^,          p\        P                  ! Wg.4      # )zm
A request sent to a HTTP/2 connection fires the
L{http.Request.notifyFinish} callback with a L{None} value.
c                 ó*   <€ SP                  V 4       R # r"   )ÚassertIsNone)rØ  r&   s   &€r'   r$  Ú?HTTP2ServerTests.test_notifyOnCompleteRequest.<locals>.validate!  s   ø€ Ø×Ñ˜fÖ%r+   )r   rí   r   r&  r  r'  rï   r  r‘   r)  r(  r   r  )r&   rÿ   rÇ   r  Ú	deferredsr$  r  rŠ  s   f       r'   Útest_notifyOnCompleteRequestÚ-HTTP2ServerTests.test_notifyOnCompleteRequest  sž   ø€ ô
 "“^ˆ
Ü$;Ô<LÓ$Mˆ
Ô!Ø×-Ñ-¨j¸$×:PÑ:PÐRTÓU‰ˆà×-Ñ-×5Ñ5ˆ	Ø×Ñœ˜Y›¨Ô+õ	&ð �a�LˆØ	�‰�hÔð %×<Ñ<¸QÕ?ˆÜ×"Ò" AÐ#7Ó8Ð8r+   c                ó’  a € \        4       p\        \        4      Vn        S P	                  VS P
                  . 4      w  r#VP                  P                  pS P                  \        V4      ^4       V 3R lpV 3R lpV^ ,          pVP                  WV4       VP                  ^R7      P                  4       pVP                  V4       V# )z_
A HTTP/2 reset stream fires the L{http.Request.notifyFinish} deferred
with L{ConnectionLost}.
c                 ó*   <€ SP                  R 4       R# ©z#Didn't errback, called back insteadN©Úfail©Úignr&   s   &€r'   r  Ú;HTTP2ServerTests.test_notifyOnResetStream.<locals>.callback<  ó   ø€ Ø�I‰IÐ;Ö<r+   c                 óœ   <€ SP                  V \        P                  4       SP                  V P                  \
        P                  4       R # r"   ©ÚassertIsInstancer   ÚFailurer  Útyper   ÚConnectionLost©Úreasonr&   s   &€r'   ÚerrbackÚ:HTTP2ServerTests.test_notifyOnResetStream.<locals>.errback?  ó2   ø€ Ø×!Ñ! &¬'¯/©/Ô:Ø�M‰M˜&Ÿ+™+¤u×';Ñ';Ô<Ùr+   r    )r   rí   r   r&  r  r'  rï   r  r‘   ÚaddCallbacksre   r°   r
  )	r&   rÿ   r£   r  r#  r  r7  r  ÚinvalidDatas	   f        r'   Útest_notifyOnResetStreamÚ)HTTP2ServerTests.test_notifyOnResetStream,  s³   ø€ ô
 "“^ˆ
Ü$;Ô<NÓ$Oˆ
Ô!Ø"&×"8Ñ"8Ø˜×.Ñ.°ó#
Ñˆð ×-Ñ-×5Ñ5ˆ	Ø×Ñœ˜Y›¨Ô+õ	=õ	ð
 �a�LˆØ	�‰�xÔ)ð #×6Ñ6ÀÐ6ÓB×LÑLÓNˆØ×Ñ Ô,àˆr+   c                ó  a € \        4       p\        \        4      Vn        S P	                  VS P
                  . 4      w  r#\        S P
                  . V^R7      pVP                  V4       VP                  P                  pS P                  \        V4      ^4       V 3R lpV 3R lpV F  pVP                  Wg4       K  	  VP                  R^ðR7      P                  4       p	VP                  V	4       \        P                  ! V4      # )z 
A HTTP/2 protocol error triggers the L{http.Request.notifyFinish}
deferred for all outstanding requests with a Failure that contains the
underlying exception.
©r£   r?   c                 ó*   <€ SP                  R 4       R# r(  r)  r+  s   &€r'   r  Ú=HTTP2ServerTests.test_failWithProtocolError.<locals>.callbackg  r.  r+   c                 ó°   <€ SP                  V \        P                  4       SP                  V P                  \        P
                  P                  4       R # r"   )r1  r   r2  r  rÿ  Ú
exceptionsÚProtocolErrorr5  s   &€r'   r7  Ú<HTTP2ServerTests.test_failWithProtocolError.<locals>.errbackj  s8   ø€ Ø×!Ñ! &¬'¯/©/Ô:Ø×!Ñ! &§,¡,´·±×0KÑ0KÔLÙr+   ó   yo©r9   r?   )r   rí   r   r&  r  r'  rµ   r
  rï   r  r‘   r:  rJ   r°   r   r  ©
r&   rÿ   r£   r  ÚsecondRequestr#  r  r7  r  r;  s
   f         r'   Útest_failWithProtocolErrorÚ+HTTP2ServerTests.test_failWithProtocolErrorM  sí   ø€ ô "“^ˆ
Ü$;Ô<NÓ$Oˆ
Ô!Ø"&×"8Ñ"8Ø˜×.Ñ.°ó#
Ñˆô *Ø×"Ñ" B°\ÈAô
ˆð 	×Ñ Ô.ð ×-Ñ-×5Ñ5ˆ	Ø×Ñœ˜Y›¨Ô+õ	=õ	ó
 ˆAØ�N‰N˜8Ö-ñ ð
 #×1Ñ1°uÀtÐ1ÓL×VÑVÓXˆØ×Ñ Ô,ä×"Ò" 9Ó-Ð-r+   c                ó  a € \        4       p\        \        4      Vn        S P	                  VS P
                  . 4      w  r#\        S P
                  . V^R7      pVP                  V4       VP                  P                  pS P                  \        V4      ^4       V 3R lpV 3R lpV F  pVP                  Wg4       K  	  VP                  ^R7      P                  4       p	VP                  V	4       \        P                  ! V4      # )z”
A HTTP/2 GoAway triggers the L{http.Request.notifyFinish}
deferred for all outstanding requests with a Failure that contains a
RemoteGoAway error.
r?  c                 ó*   <€ SP                  R 4       R# r(  r)  r+  s   &€r'   r  Ú4HTTP2ServerTests.test_failOnGoaway.<locals>.callback’  r.  r+   c                 óœ   <€ SP                  V \        P                  4       SP                  V P                  \
        P                  4       R # r"   r0  r5  s   &€r'   r7  Ú3HTTP2ServerTests.test_failOnGoaway.<locals>.errback•  r9  r+   r›  )r   rí   r   r&  r  r'  rµ   r
  rï   r  r‘   r:  ra   r°   r   r  rH  s
   f         r'   Útest_failOnGoawayÚ"HTTP2ServerTests.test_failOnGoawayy  së   ø€ ô "“^ˆ
Ü$;Ô<NÓ$Oˆ
Ô!Ø"&×"8Ñ"8Ø˜×.Ñ.°ó#
Ñˆô *Ø×"Ñ" B°\ÈAô
ˆð 	×Ñ Ô.ð ×-Ñ-×5Ñ5ˆ	Ø×Ñœ˜Y›¨Ô+õ	=õ	ó
 ˆAØ�N‰N˜8Ö-ñ ð #×3Ñ3ÀÐ3ÓC×MÑMÓOˆØ×Ñ Ô,ä×"Ò" 9Ó-Ð-r+   c                óÌ  a € \        4       p\        \        4      Vn        S P	                  VS P
                  . 4      w  r#\        S P
                  . V^R7      pVP                  V4       VP                  P                  pS P                  \        V4      ^4       V 3R lpV 3R lpV F  pVP                  Wg4       K  	  VP                  4        \        P                  ! V4      # )z‚
The transport telling the HTTP/2 connection to stop producing will
fire all L{http.Request.notifyFinish} errbacks with L{error.}
r?  c                 ó*   <€ SP                  R 4       R# r(  r)  r+  s   &€r'   r  Ú;HTTP2ServerTests.test_failOnStopProducing.<locals>.callback¼  r.  r+   c                 óœ   <€ SP                  V \        P                  4       SP                  V P                  \
        P                  4       R # r"   r0  r5  s   &€r'   r7  Ú:HTTP2ServerTests.test_failOnStopProducing.<locals>.errback¿  r9  r+   )r   rí   r   r&  r  r'  rµ   r
  rï   r  r‘   r:  rå   r   r  )	r&   rÿ   r£   r  rI  r#  r  r7  r  s	   f        r'   Útest_failOnStopProducingÚ)HTTP2ServerTests.test_failOnStopProducing£  sÍ   ø€ ô "“^ˆ
Ü$;Ô<NÓ$Oˆ
Ô!Ø"&×"8Ñ"8Ø˜×.Ñ.°ó#
Ñˆô *Ø×"Ñ" B°\ÈAô
ˆð 	×Ñ Ô.ð ×-Ñ-×5Ñ5ˆ	Ø×Ñœ˜Y›¨Ô+õ	=õ	ó
 ˆAØ�N‰N˜8Ö-ñ ð 	× Ñ Ô"ä×"Ò" 9Ó-Ð-r+   c                óv  a € \        4       p\        \        4      Vn        S P	                  VS P
                  . 4      w  r#VP                  P                  pS P                  \        V4      ^4       V 3R lpV 3R lpV^ ,          pVP                  WV4       VP                  ^,          pVP                  4        V# )z«
A HTTP/2 stream that has had _respondToBadRequestAndDisconnect called
on it from a request handler calls the L{http.Request.notifyFinish}
errback with L{ConnectionLost}.
c                 ó*   <€ SP                  R 4       R# r(  r)  r+  s   &€r'   r  Ú7HTTP2ServerTests.test_notifyOnFast400.<locals>.callbackÝ  r.  r+   c                 óœ   <€ SP                  V \        P                  4       SP                  V P                  \
        P                  4       R # r"   r0  r5  s   &€r'   r7  Ú6HTTP2ServerTests.test_notifyOnFast400.<locals>.errbackà  r9  r+   )r   rí   r   r&  r  r'  rï   r  r‘   r:  r{  r«  )	r&   rÿ   r£   r  r#  r  r7  r  r¬  s	   f        r'   Útest_notifyOnFast400Ú%HTTP2ServerTests.test_notifyOnFast400Ì  s¥   ø€ ô "“^ˆ
Ü$;Ô<NÓ$Oˆ
Ô!Ø"&×"8Ñ"8Ø˜×.Ñ.°ó#
Ñˆð ×-Ñ-×5Ñ5ˆ	Ø×Ñœ˜Y›¨Ô+õ	=õ	ð
 �a�LˆØ	�‰�xÔ)ð ×#Ñ# AÕ&ˆØ×0Ñ0Ô2àˆr+   c           	     óÌ  € \        4       p\        V4      pVP                  Vn        \        Vn        ^p\        4       p\        4       pVP                  4       pVP                  V4       VP                  V4       VP                  \        V P                  . WCR7      4       VP                  4        ^ Vn        VP                  V4       V P                  VP                   4       R# )z¸
A HTTP/2 stream that has had _respondToBadRequestAndDisconnect
called on it does not write control frame data if its
transport is paused and its control frame limit has been
reached.
r    N)r	   r   ræ  r   r&  r    r
   r1   r	  r
  rµ   r'  rÏ   Ú_maxBufferedControlFrameBytesr«  r  Údisconnected)r&   ÚmemoryReactorrÿ   r?   r£   r  r1   s   &      r'   Útest_fast400WithCircuitBreakerÚ/HTTP2ServerTests.test_fast400WithCircuitBreakeró  sÉ   € ô +Ó,ˆÜ! -Ó0ˆ
Ø,×6Ñ6ˆ
Ôô %7ˆ
Ô!àˆä#“~ˆÜ#Ó%ˆ	ð #/×"FÑ"FÓ"HÐØ×!Ñ! )Ô,Ø×ÑÐ 7Ô8à×ÑÜØ×&Ñ&¨¨Lôô	
ð 	×!Ñ!Ô#Ø34ˆ
Ô0à×4Ñ4°XÔ>à�‰˜	×.Ñ.Ö/r+   c                óN  € \        4       p\        Vn        \        4       p\	        4       pVP                  4       pVP                  V4       VP                  V4       VP                  4        \        ^ ^d4       F1  pVP                  VP                  / 4      P                  4       4       K3  	  \        VP                  4       4      pV P                  \        V4      ^4       VP!                  4        \        VP                  4       4      pV P                  \        V4      ^e4       R# )zx
If a the L{H2Connection} has been paused by the transport, it will
not write automatic frame data triggered by writes.
N)r   r   r&  r    r
   r1   r	  r
  rÏ   rÂ   rQ   r°   r¹   r  r  r‘   rÖ   )r&   rÿ   r£   r  r1   rÇ   r«   s   &      r'   Ú test_bufferingAutomaticFrameDataÚ1HTTP2ServerTests.test_bufferingAutomaticFrameData  sê   € ô "“^ˆ
Ü$9ˆ
Ô!Ü#“~ˆÜ#Ó%ˆ	à".×"FÑ"FÓ"HÐØ×!Ñ! )Ô,Ø×ÑÐ 7Ô8ð 	×!Ñ!Ô#ô �q˜#–ˆAØ×#Ñ# L×$CÑ$CÀBÓ$G×$QÑ$QÓ$SÖTñ ô ! §¡Ó!2Ó3ˆØ×Ñœ˜V› aÔ(ð 	×"Ñ"Ô$Ü  §¡Ó!2Ó3ˆØ×Ñœ˜V› cÖ*r+   c                ój  € \        4       p\        Vn        \        4       p\	        4       pVP                  4       pVP                  V4       VP                  V4       VP                  4        ^dVn	        V P                  VP                  4       \        ^ ^4       F1  pVP                  VP                  / 4      P                  4       4       K3  	  V P                  VP                  4       VP                  VP                  / 4      P                  4       4       V P                  VP                   4       R# )zµ
If the L{H2Connection} has been paused by the transport, it will
not write automatic frame data triggered by writes. If this buffer
gets too large, the connection will be dropped.
N)r   r   r&  r    r
   r1   r	  r
  rÏ   rb  r~  rr  rÂ   rQ   r°   r  rc  )r&   rÿ   r£   r  r1   rÇ   s   &     r'   Ú2test_bufferingAutomaticFrameDataWithCircuitBreakerÚCHTTP2ServerTests.test_bufferingAutomaticFrameDataWithCircuitBreaker<  sø   € ô "“^ˆ
Ü$9ˆ
Ô!Ü#“~ˆÜ#Ó%ˆ	à".×"FÑ"FÓ"HÐØ×!Ñ! )Ô,Ø×ÑÐ 7Ô8ð 	×!Ñ!Ô#ð 47ˆ
Ô0ð 	×Ñ˜×0Ñ0Ô1Ü�q˜"–ˆAØ×#Ñ# L×$CÑ$CÀBÓ$G×$QÑ$QÓ$SÖTñ à×Ñ˜×0Ñ0Ô1ð 	×Ñ × ?Ñ ?ÀÓ C× MÑ MÓ OÔPØ�‰˜	×.Ñ.Ö/r+   c                ó°  €  ! R R\         4      p\        4       p\        Vn        \	        4       pV! 4       pVP                  VR4       VP                  4       pVP                  V4       VP                  V4       V P                  VP                  4       \        VP                  4       4      pV P                  \        V4      ^4       V P                  VP                  ^ 4       \!        ^ ^4       F1  pVP                  VP#                  / 4      P%                  4       4       K3  	  \        VP                  4       4      pV P                  \        V4      ^4       V P                  VP                  ^c4       VP'                  4        \        VP                  4       4      pV P                  \        V4      ^4       V P                  VP                  ^Z4       R# )z—
If the L{H2Connection} has buffered control frames, is unpaused, and then
paused while unbuffering, it persists the buffer and stops trying to write.
c                   ó&   a € ] tR tRt o R tRtV tR# )ÚeHTTP2ServerTests.test_bufferingContinuesIfProducerIsPausedOnWrite.<locals>.AutoPausingStringTransportid  c                ón   € \         P                  ! V .VO5/ VB  V P                  P                  4        R # r"   )r
   rÃ   ÚproducerrÏ   rÑ   s   &*,r'   rÃ   ÚkHTTP2ServerTests.test_bufferingContinuesIfProducerIsPausedOnWrite.<locals>.AutoPausingStringTransport.writee  s*   € Ü×%Ò% dÐ<¨TÒ<°VÒ<Ø—‘×,Ñ,Ö.r+   r0   N)ry   rz   r{   r|   rÃ   r~   r   r€   s   @r'   ÚAutoPausingStringTransportro  d  s   ø‡ € ÷/ð /r+   rs  TN)r
   r   r   r&  r    rê   r1   r	  r
  ÚassertIsNotNoneÚ_consumerBlockedr¹   r  r  r‘   Ú_bufferedControlFrameBytesrÂ   rQ   r°   rÖ   )r&   rs  rÿ   r£   r  r1   r«   rÇ   s   &       r'   Ú0test_bufferingContinuesIfProducerIsPausedOnWriteÚAHTTP2ServerTests.test_bufferingContinuesIfProducerIsPausedOnWrite^  su  € ô	/¬ô 	/ô "“^ˆ
Ü$9ˆ
Ô!Ü#“~ˆÙ.Ó0ˆ	Ø×"Ñ" :¨tÔ4à".×"FÑ"FÓ"HÐØ×!Ñ! )Ô,Ø×ÑÐ 7Ô8ð 	×Ñ˜Z×8Ñ8Ô9Ü  §¡Ó!2Ó3ˆØ×Ñœ˜V› aÔ(Ø×Ñ˜×>Ñ>ÀÔBô �q˜"–ˆAØ×#Ñ# L×$CÑ$CÀBÓ$G×$QÑ$QÓ$SÖTñ ô ! §¡Ó!2Ó3ˆØ×Ñœ˜V› aÔ(Ø×Ñ˜×>Ñ>ÀÔGð 	×"Ñ"Ô$ä  §¡Ó!2Ó3ˆØ×Ñœ˜V› aÔ(Ø×Ñ˜×>Ñ>ÀÖGr+   c                ó¦  € \        4       p\        V4      pVP                  Vn        \        4       p\	        4       pVP                  4       pVP                  V4       VP                  V4       VP                  4        ^ Vn	        VP                  R^ðR7      P                  4       pVP                  V4       V P                  VP                  4       R# )z¨
A client that triggers a L{h2.exceptions.ProtocolError} over a
paused connection that's reached its buffered control frame
limit causes that connection to be aborted.
rF  rG  N)r	   r   ræ  r    r
   r1   r	  r
  rÏ   rb  rJ   r°   r  rc  )r&   rd  rÿ   r£   r  r1   r;  s   &      r'   Ú+test_circuitBreakerAbortsAfterProtocolErrorÚ<HTTP2ServerTests.test_circuitBreakerAbortsAfterProtocolError‹  s¹   € ô +Ó,ˆÜ! -Ó0ˆ
Ø,×6Ñ6ˆ
Ôä#“~ˆÜ#Ó%ˆ	ð #/×"FÑ"FÓ"HÐØ×!Ñ! )Ô,Ø×ÑÐ 7Ô8ð 	×!Ñ!Ô#Ø34ˆ
Ô0ð #×1Ñ1°uÀtÐ1ÓL×VÑVÓXˆð 	×Ñ Ô,Ø�‰˜	×.Ñ.Ö/r+   r0   N©©ó   :methodó   GET©s
   :authoritys	   localhost©ó   :pathr½   ©s   :schemes   https©s
   user-agents   twisted-test-code)ó   custom-headerrÊ  )r…  rË  ©)r~  rH  r€  )r‚  rE  rƒ  r„  )r<  s   25©s   hello s   world, s   it's s   http/2!)rA  )rD  r½   )rG  r  rI  )r<  s   13)rA  rC  rF  rI  )r<  s   36).ry   rz   r{   r|   r'  r7  r8  r!  r"  r4  r5  r  r+  r9  rL  r`  ro  rs  r€  r‹  r˜  rŸ  r¦  r­  r¾  rÂ  rÚ  rß  rç  rñ  r  r	  r  r$  r<  rJ  rQ  rX  r_  re  rh  rk  rw  rz  r~   r   r€   s   @r'   r  r  �  s	  ø‡ € òÐòÐò D€OòÐð *€OòÐð BÐò'ò:Kò8Kò8)KòV>
ò@E
òN%)òN+KòZ,5ò\35òj25òhKò8%5òN+KòZNò KòD
0òSò,8ò>@BòD7ò. 9òD9ò.òB*.òX(.òT'.òR%òN(0òT+ò> 0òD+H÷Z0ð 0r+   r  c                   ó’   a € ] tR tRt o Rt. ROtRt. ROt. ROtRt	R t
R tR tR tR	 tR
 tR tR tR tR tR tR tR tRtV tR# )ÚH2FlowControlTestsi«  zL
Tests that ensure that we handle HTTP/2 flow control limits appropriately.
r  r  c                óÀ  a a	€ \        4       p\        4       o	\        4       p\        Vn        VP                  4       pW1P                  \        P                  P                  P                  ^/4      P                  4       ,          pV\        S P                  . V4      ,          pVP                  S	4       \        V4       F  pVP!                  V4       K  	  \#        S P$                  4      ^,
          p\'        V4       F5  pVP)                  ^^R7      pVP!                  VP                  4       4       K7  	  V	V 3R lpVP*                  ^,          P-                  V4      # )zÇ
When a L{Request} object is not using C{IProducer} to generate data and
so is not having backpressure exerted on it, the L{H2Stream} object
will buffer data until the flow control window is opened.
rù  c                 óì   <€ \        SP                  4       4      pSP                  R VR,          P                  9   4       RP	                  R V 4       4      pSP                  SP                  V4       R# )r¦   r+   c              3   ó’   "  € T F=  p\        V\        P                  P                  4      '       g   K/  VP                  x € K?  	  R # 5ir"   ©r—   r5   r6   rI   r9   r±   s   & r'   r¤   ÚMH2FlowControlTests.test_bufferExcessData.<locals>.validate.<locals>.<genexpr>í  ó.   é € ð *Ù &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—–£ùó
   ‚,A³ANr§   )r¹   r  r  r:   r´   r  r"  ©r?   r«   ÚactualResponseDatarU  r&   s   &  €€r'   r$  Ú:H2FlowControlTests.test_bufferExcessData.<locals>.validateæ  sg   ø€ Ü$ Q§W¡W£YÓ/ˆFð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ð "%§¡ñ *Ù &ó*ó "Ðð ×Ñ˜T×1Ñ1Ð3EÖFr+   )r    r
   r   r   r&  r1   rQ   rÿ  rO   r   r  r°   rµ   r'  r	  r   r
  r‘   r"  rÂ   rW   r(  r)  )
r&   rA   r_  r  r  ÚbonusFramesrÇ   r6   r$  rU  s
   f        @r'   Útest_bufferExcessDataÚ(H2FlowControlTests.test_bufferExcessDataÇ  s  ù€ ô ‹NˆÜÓˆÜ‹NˆÜ0ˆÔð ×0Ñ0Ó2ˆØ×,Ñ,Ü�[‰[×%Ñ%×9Ñ9¸1Ð=ó
ç
‰)‹+õ	ˆð 	Ô)¨$×*@Ñ*@À"ÀaÓHÕHˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ô ˜$×.Ñ.Ó/°!Õ3ˆÜ�{Ö#ˆAØ×,Ñ,°aÀ1Ð,ÓEˆEØ�N‰N˜5Ÿ?™?Ó,Ö-ñ $ö

	Gð ×(Ñ(¨Õ+×7Ñ7¸ÓAÐAr+   c                óª  a a€ \        4       p\        4       o\        4       p\        Vn        VP                  4       pW1P                  \        P                  P                  P                  ^/4      P                  4       ,          pV\        S P                  . V4      ,          pVP                  S4       \        V4       F  pVP!                  V4       K  	  VP"                  ^,          pVP$                  P&                  pS P)                  VP*                  4       VP-                  R4       S P/                  VP*                  4       S P1                  VP2                  P4                  R.4       VP!                  VP7                  ^^R7      P                  4       4       S P/                  VP*                  4       S P1                  VP2                  P4                  R.4       VP!                  VP7                  ^ ^R7      P                  4       4       S P/                  VP*                  4       S P1                  VP2                  P4                  R.4       VP!                  VP7                  ^^R7      P                  4       4       S P)                  VP*                  4       S P1                  VP2                  P4                  RR.4       VP-                  R4       S P/                  VP*                  4       S P1                  VP2                  P4                  . RO4       VP!                  VP7                  ^^2R7      P                  4       4       S P)                  VP*                  4       S P1                  VP2                  P4                  . RO4       VP9                  4        VP;                  4        VV 3R lpVP<                  ^,          P?                  V4      # )zo
L{Request} objects that have registered producers get blocked and
unblocked according to HTTP/2 flow control.
ó
   helloworldÚpauserù  Úresumec                 óD  <€ \        SP                  4       4      pSP                  R VR,          P                  9   4       V Uu. uF;  p\	        V\
        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  V. RO4       R# u upi )r¦   Nr§   )r˜  r˜  r+   rÓ  ©r?   r«   rA   rµ  rU  r&   s   &   €€r'   r$  ÚDH2FlowControlTests.test_producerBlockingUnblocking.<locals>.validate9  s�   ø€ Ü$ Q§W¡W£YÓ/ˆFð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'óÙ &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð ð ×Ñ˜ZÒ)LÖMùòrÖ  )r™  rš  r™  )r™  rš  r™  rš  ) r    r
   r   r•  r&  r1   rQ   rÿ  rO   r   r  r°   rµ   r'  r	  r   r
  r{  r|  r}  r  Ú_producerProducingrÃ   r~  r  rq  ÚeventsrW   ÚunregisterProducerrÅ   r(  r)  ©	r&   rA   r_  r  r  r¬  r  r$  rU  s	   f       @r'   Útest_producerBlockingUnblockingÚ2H2FlowControlTests.test_producerBlockingUnblockingô  s   ù€ ô
 ‹NˆÜÓˆÜ‹NˆÜ4ˆÔð ×0Ñ0Ó2ˆØ×,Ñ,Ü�[‰[×%Ñ%×9Ñ9¸1Ð=ó
ç
‰)‹+õ	ˆð 	Ô)¨$×*@Ñ*@À"ÀaÓHÕHˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð —‘˜1•ˆØ—/‘/×*Ñ*ˆð 	�‰˜×1Ñ1Ô2ð 	�‰�mÔ$ð 	×Ñ˜×2Ñ2Ô3Ø×Ñ˜×)Ñ)×0Ñ0°7°)Ô<ð 	
�‰�q×/Ñ/¸ÀaÐ/ÓH×RÑRÓTÔUØ×Ñ˜×2Ñ2Ô3Ø×Ñ˜×)Ñ)×0Ñ0°7°)Ô<ð 	
�‰�q×/Ñ/¸ÀaÐ/ÓH×RÑRÓTÔUØ×Ñ˜×2Ñ2Ô3Ø×Ñ˜×)Ñ)×0Ñ0°7°)Ô<ð 	
�‰�q×/Ñ/¸ÀaÐ/ÓH×RÑRÓTÔUØ�‰˜×1Ñ1Ô2Ø×Ñ˜×)Ñ)×0Ñ0°7¸HÐ2EÔFð
 	�‰�mÔ$Ø×Ñ˜×2Ñ2Ô3Ø×Ñ˜×)Ñ)×0Ñ0Ò2NÔOð 	
�‰�q×/Ñ/¸ÀbÐ/ÓI×SÑSÓUÔVØ�‰˜×1Ñ1Ô2Ø×ÑØ×Ñ×#Ñ#Ò%Kô	
ð 	×"Ñ"Ô$Ø�‰Ôö
	Nð ×(Ñ(¨Õ+×7Ñ7¸ÓAÐAr+   c                óÔ  a aaa	a
a€ \        4       o	\        4       o\        4       o\        Sn        S	P                  4       pVS	P                  \        P                  P                  P                  ^/4      P                  4       ,          pV\        S P                  . S	4      ,          pSP                  S4       \        V4       F  pSP!                  V4       K  	  SP"                  ^,          oSP$                  P&                  o
S P)                  SP*                  4       S
P-                  R4       S P/                  SP*                  4       S P1                  S
P2                  P4                  R.4       S
P-                  R4       VV	V
V V3R lp\6        P8                  ! \:        ^ V4      pVV 3R lpSP<                  ^,          P?                  V4      p\@        PB                  ! WF.4      # )zA
Exactly filling the flow control window still blocks producers.
r˜  r™  ó   hc                  ó.  <€ S P                  SP                  ^^2R7      P                  4       4       SP                  SP                  4       SP                  SP                  P                  RR.4       SP                  4        SP                  4        R# )rw   rù  r™  rš  N)
r
  rW   r°   r  rž  r  rq  rŸ  r   rÅ   )r_  rA   r  r&   r¬  s   €€€€€r'   Úwindow_openÚ=H2FlowControlTests.test_flowControlExact.<locals>.window_openn  sv   ø€ Ø�N‰NØ×(Ñ(°!¸rÐ(ÓB×LÑLÓNôð �O‰O˜F×5Ñ5Ô6Ø×Ñ˜W×-Ñ-×4Ñ4°wÀÐ6IÔJØ×&Ñ&Ô(Ø�N‰NÖr+   c                 óD  <€ \        SP                  4       4      pSP                  R VR,          P                  9   4       V Uu. uF;  p\	        V\
        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  V. RO4       R# u upi )r¦   Nr§   )r·  r¸  r¥  r+   rÓ  rœ  s   &   €€r'   r$  Ú:H2FlowControlTests.test_flowControlExact.<locals>.validatez  s�   ø€ Ü$ Q§W¡W£YÓ/ˆFð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'óÙ &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð ð ×Ñ˜ZÒ)HÖIùòrÖ  )"r    r
   r   r•  r&  r1   rQ   rÿ  rO   r   r  r°   rµ   r'  r	  r   r
  r{  r|  r}  r  rž  rÃ   r~  r  rq  rŸ  r   r  r   r(  r)  r   r\  )r&   r  r  r§  ÚwindowDeferr$  ÚvalidateDeferr_  rU  rA   r  r¬  s   f      @@@@@r'   Útest_flowControlExactÚ(H2FlowControlTests.test_flowControlExactG  sƒ  ý€ ô ‹NˆÜÓˆÜ‹NˆÜ4ˆÔð ×0Ñ0Ó2ˆØ˜×,Ñ,Ü�[‰[×%Ñ%×9Ñ9¸1Ð=ó
ç
‰)‹+õ	ˆð 	Ô)¨$×*@Ñ*@À"ÀaÓHÕHˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð —‘˜1•ˆØ—/‘/×*Ñ*ˆð 	�‰˜×1Ñ1Ô2ð 	�‰�mÔ$Ø×Ñ˜×2Ñ2Ô3Ø×Ñ˜×)Ñ)×0Ñ0°7°)Ô<ð 	�‰�dÔ÷	ñ 	ô —o’o¤g¨q°+Ó>ˆö
	Jð ×1Ñ1°!Õ4×@Ñ@ÀÓJˆÜ×!Ò! ;Ð">Ó?Ð?r+   c           	     ó¢  a a€ \        4       p\        4       o\        4       p\        Vn        VP                  4       pW1P                  \        P                  P                  P                  ^/4      P                  4       ,          pV\        S P                  . V4      ,          pVP                  S4       \        V4       F  pVP!                  V4       K  	  VP"                  ^,          pVP$                  P&                  pS P)                  VP*                  4       VP-                  R4       VP/                  4        VP1                  4        S P)                  VP2                  4       \4        P6                  ! ^ VP                   VP9                  ^^2R7      P                  4       4       VV 3R lpVP:                  ^,          P=                  V4      # )z�
L{Request} objects that end a stream that is currently blocked behind
flow control can still end the stream and get cleaned up.
r˜  rù  c                 óD  <€ \        SP                  4       4      pSP                  R VR,          P                  9   4       V Uu. uF;  p\	        V\
        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  V. RO4       R# u upi )r¦   Nr§   )r·  r¸  r+   rÓ  rœ  s   &   €€r'   r$  Ú=H2FlowControlTests.test_endingBlockedStream.<locals>.validateµ  s�   ø€ Ü$ Q§W¡W£YÓ/ˆFð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'óÙ &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð ð ×Ñ˜ZÒ)BÖCùòrÖ  )r    r
   r   r•  r&  r1   rQ   rÿ  rO   r   r  r°   rµ   r'  r	  r   r
  r{  r|  r}  r  rž  rÃ   r   rÅ   Úfinishedr   ræ  rW   r(  r)  r¡  s	   f       @r'   Útest_endingBlockedStreamÚ+H2FlowControlTests.test_endingBlockedStream‰  sp  ù€ ô
 ‹NˆÜÓˆÜ‹NˆÜ4ˆÔð ×0Ñ0Ó2ˆØ×,Ñ,Ü�[‰[×%Ñ%×9Ñ9¸1Ð=ó
ç
‰)‹+õ	ˆð 	Ô)¨$×*@Ñ*@À"ÀaÓHÕHˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð —‘˜1•ˆØ—/‘/×*Ñ*ˆð 	�‰˜×1Ñ1Ô2ð 	�‰�mÔ$Ø×"Ñ"Ô$Ø�‰Ôð 	�‰˜×(Ñ(Ô)ô 	×ÒØØ�N‰NØ×$Ñ$¨a¸2Ð$Ó>×HÑHÓJô	
ö
	Dð ×(Ñ(¨Õ+×7Ñ7¸ÓAÐAr+   c                ó:  a a	€ \        4       p\        4       o	\        4       p\        Vn        VP                  4       pV\        S P                  . V4      ,          pVP                  S	4       \        V4       F  pVP                  V4       K  	  VP                  ^,          pVP                  P                  pVP                  ^,          pVP                  4        VP!                  4        S P#                  VP$                  4       V	V 3R lpVP'                  V4      # )z,
We safely handle responses without bodies.
c                 óx  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  RVR,          P
                  9   4       V Uu. uF;  p\        V\        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  VR.4       R# u upi ©rh  r¦   r+   Nr§   ©r¹   r  r  r‘   r  r:   r—   r5   r6   rI   r9   rœ  s   &   €€r'   r$  Ú=H2FlowControlTests.test_responseWithoutBody.<locals>.validateä  óš   ø€ Ü$ Q§W¡W£YÓ/ˆFà×ÑœS ›[¨!Ô,ð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'óÙ &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð ð ×ÑØØ�öùòó   Á,B7ÂB7)r    r
   r   r•  r&  r1   rµ   r'  r	  r   r
  r{  r|  r}  r(  r   rÅ   r  r²  r)  ©
r&   rA   r_  r  r  r¬  r  rŠ  r$  rU  s
   f        @r'   Útest_responseWithoutBodyÚ+H2FlowControlTests.test_responseWithoutBodyÃ  sê   ù€ ô ‹NˆÜÓˆÜ‹Nˆô 5ˆÔð ×0Ñ0Ó2ˆØÔ)¨$×*@Ñ*@À"ÀaÓHÕHˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð —‘˜1•ˆØ—/‘/×*Ñ*ˆØ×3Ñ3°AÕ6ˆð 	×"Ñ"Ô$Ø�‰Ôð 	�‰˜×(Ñ(Ô)ö	ð" ×*Ñ*¨8Ó4Ð4r+   c                óš  a a	€ \        4       p\        4       o	\        4       p\        Vn        VP                  4       pV\        S P                  . V4      ,          pVP                  S	4       \        V4       F  pVP                  V4       K  	  VP                  ^,          pVP                  P                  pVP                  ^,          pVP                  4        VP!                  4        S P#                  VP$                  4       VP                  VP'                  ^^2R7      P)                  4       4       V	V 3R lpVP+                  V4      # )zS
WindowUpdate frames received after we've completed the stream are
safely handled.
rù  c                 óx  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  RVR,          P
                  9   4       V Uu. uF;  p\        V\        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  VR.4       R# u upi r·  r¸  rœ  s   &   €€r'   r$  ÚGH2FlowControlTests.test_windowUpdateForCompleteStream.<locals>.validate  rº  r»  )r    r
   r   r•  r&  r1   rµ   r'  r	  r   r
  r{  r|  r}  r(  r   rÅ   r  r²  rW   r°   r)  r¼  s
   f        @r'   Ú"test_windowUpdateForCompleteStreamÚ5H2FlowControlTests.test_windowUpdateForCompleteStream÷  s  ù€ ô ‹NˆÜÓˆÜ‹Nˆô 5ˆÔð ×0Ñ0Ó2ˆØÔ)¨$×*@Ñ*@À"ÀaÓHÕHˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð —‘˜1•ˆØ—/‘/×*Ñ*ˆØ×3Ñ3°AÕ6ˆð 	×"Ñ"Ô$Ø�‰Ôð 	�‰˜×(Ñ(Ô)ð 	
�‰�q×/Ñ/¸ÀbÐ/ÓI×SÑSÓUÔVö	ð" ×*Ñ*¨8Ó4Ð4r+   c                óN  a a€ \        4       p\        4       o\        4       p\        Vn        VP                  4       pW1P                  \        P                  P                  P                  ^/4      P                  4       ,          pV\        S P                  . V4      ,          pVP                  S4       \        V4       F  pVP!                  V4       K  	  VP"                  ^,          pVP$                  P&                  pS P)                  VP*                  4       VP-                  R4       S P)                  VP*                  4       S P/                  VP0                  P2                  . 4       VP!                  VP5                  ^^R7      P                  4       4       S P)                  VP*                  4       S P/                  VP0                  P2                  . 4       VP7                  4        VP9                  4        VV 3R lpVP:                  ^,          P=                  V4      # )z�
L{Request} objects that have registered producers that are not blocked
behind flow control do not have their producer notified.
ó   wordrù  c                 óD  <€ \        SP                  4       4      pSP                  R VR,          P                  9   4       V Uu. uF;  p\	        V\
        P                  P                  4      '       g   K/  VP                  NK=  	  ppSP                  VRR.4       R# u upi )r¦   rÅ  r+   Nr§   rÓ  rœ  s   &   €€r'   r$  Ú;H2FlowControlTests.test_producerUnblocked.<locals>.validate`  s„   ø€ Ü$ Q§W¡W£YÓ/ˆFð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ñ !'óÙ &˜1¬*°Q¼
×8HÑ8H×8RÑ8R×*S”�—”¡ð ð ð ×Ñ˜Z¨'°3¨Ö8ùòrÖ  )r    r
   r   r•  r&  r1   rQ   rÿ  rO   r   r  r°   rµ   r'  r	  r   r
  r{  r|  r}  r  rž  rÃ   r  rq  rŸ  rW   r   rÅ   r(  r)  r¡  s	   f       @r'   Útest_producerUnblockedÚ)H2FlowControlTests.test_producerUnblocked2  s¬  ù€ ô
 ‹NˆÜÓˆÜ‹NˆÜ4ˆÔð ×0Ñ0Ó2ˆØ×,Ñ,Ü�[‰[×%Ñ%×9Ñ9¸1Ð=ó
ç
‰)‹+õ	ˆð 	Ô)¨$×*@Ñ*@À"ÀaÓHÕHˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð —‘˜1•ˆØ—/‘/×*Ñ*ˆð 	�‰˜×1Ñ1Ô2ð 	�‰�gÔð 	�‰˜×1Ñ1Ô2Ø×Ñ˜×)Ñ)×0Ñ0°"Ô5ð 	
�‰�q×/Ñ/¸ÀaÐ/ÓH×RÑRÓTÔUØ�‰˜×1Ñ1Ô2Ø×Ñ˜×)Ñ)×0Ñ0°"Ô5ð 	×"Ñ"Ô$Ø�‰Ôö
	9ð ×(Ñ(¨Õ+×7Ñ7¸ÓAÐAr+   c                óø  a a€ \        4       p\        4       o\        4       p\        Vn        \        S P                  S P                  V4      pVP                  ^VP                  ^ ^R7      4       VP                  4       pVRP                  R V 4       4      ,          pVP                  S4       \        V4       F  pVP                  V4       K  	  VV 3R lpVP                  ^,          P!                  V4      # )z|
When a WindowUpdate frame is received for the whole connection but no
data is currently waiting, nothing exciting happens.
rù  r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚBH2FlowControlTests.test_unnecessaryWindowUpdate.<locals>.<genexpr>|  r…  r³   c                 óì   <€ \        SP                  4       4      pSP                  R VR,          P                  9   4       RP	                  R V 4       4      pSP                  SP                  V4       R# )r¦   r+   c              3   ó’   "  € T F=  p\        V\        P                  P                  4      '       g   K/  VP                  x € K?  	  R # 5ir"   r�  r±   s   & r'   r¤   ÚTH2FlowControlTests.test_unnecessaryWindowUpdate.<locals>.validate.<locals>.<genexpr>Š  r�  r�  Nr§   )r¹   r  r  r:   r´   r  r5  r‘  s   &  €€r'   r$  ÚAH2FlowControlTests.test_unnecessaryWindowUpdate.<locals>.validateƒ  sg   ø€ Ü$ Q§W¡W£YÓ/ˆFð �O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ô=ð "%§¡ñ *Ù &ó*ó "Ðð ×Ñ˜T×2Ñ2Ð4FÖGr+   )r    r
   r   r   r&  r¬   r7  r8  rm  rW   r1   r´   r	  r   r
  r(  r)  )r&   rA   r_  r«   r  r  r$  rU  s   f      @r'   Útest_unnecessaryWindowUpdateÚ/H2FlowControlTests.test_unnecessaryWindowUpdaten  sÒ   ù€ ô
 ‹NˆÜÓˆÜ‹NˆÜ0ˆÔô $ D×$;Ñ$;¸T×=QÑ=QÐSTÓUˆØ�‰�a˜×1Ñ1¸1ÈÐ1ÓJÔKØ×0Ñ0Ó2ˆØ˜Ÿ™Ñ ?¹Ó ?Ó?Õ?ˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ö
	Hð ×(Ñ(¨Õ+×7Ñ7¸ÓAÐAr+   c                ó¼  € \        4       p\        4       p\        4       p\        Vn        . pVP                  VP                  V P                  ^R7      4       VP                  VP                  ^^R7      4       VP                  4       pVRP                  R V 4       4      ,          pVP                  V4       VP                  V4       V P                  V4       R# )zÄ
When a WindowUpdate frame is received for a stream but no data is
currently waiting, that stream is not marked as unblocked and the
priority tree continues to assert that no stream can progress.
rž   rù  r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚKH2FlowControlTests.test_unnecessaryWindowUpdateForStream.<locals>.<genexpr>£  s   é € Ð7±¨1Ÿ™Ÿ˜³ùr³   N)r    r
   r   r   r&  r¨   rE   r7  rW   r1   r´   r	  r
  r   )r&   rA   r  Úconnr«   r9   s   &     r'   Ú%test_unnecessaryWindowUpdateForStreamÚ8H2FlowControlTests.test_unnecessaryWindowUpdateForStream‘  s¹   € ô ‹NˆÜ#Ó%ˆ	Ü‹~ˆÜ3ˆÔð
 ˆØ�‰�a×)Ñ)°$×2IÑ2IÐTUÐ)ÓVÔWØ�‰�a×.Ñ.¸ÀQÐ.ÓGÔHØ×(Ñ(Ó*ˆØ�—‘Ñ7±Ó7Ó7Õ7ˆà×Ñ˜IÔ&Ø×Ñ˜$Ôà×$Ñ$ TÖ*r+   c                ó¬  € \        4       p\        4       p\        4       p\        Vn        \        V P                  V P                  V4      pVP                  4       pVRP                  R V 4       4      ,          pVP                  V4       \        V4       F  pVP                  V4       K  	  VP                  ^,          P                  4        VP                  ^^R7      pVP                  VP!                  4       4       \#        VP%                  4       4      pV P'                  \)        VR,          \*        P,                  P.                  4      4       R# )zY
When a WindowUpdate frame is received for a stream that has been
aborted it is ignored.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚEH2FlowControlTests.test_windowUpdateAfterTerminate.<locals>.<genexpr>·  r…  r³   rù  Nr§   )r    r
   r   r   r&  r¬   r7  r8  r1   r´   r	  r   r
  r{  rÞ  rW   r°   r¹   r  r  r—   r5   r6   rd   )r&   rA   rU  r_  r«   r  r  ÚwindowUpdateFrames   &       r'   Útest_windowUpdateAfterTerminateÚ2H2FlowControlTests.test_windowUpdateAfterTerminateª  s
  € ô
 ‹NˆÜÓˆÜ‹NˆÜ0ˆÔô $ D×$;Ñ$;¸T×=QÑ=QÐSTÓUˆØ×0Ñ0Ó2ˆØ˜Ÿ™Ñ ?¹Ó ?Ó?Õ?ˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð 	
�	‰	�!�×$Ñ$Ô&ð ×4Ñ4¸aÈ1Ð4ÓMÐØ	�‰Ð(×2Ñ2Ó4Ô5ô ! §¡£Ó+ˆð 	�‰œ
 6¨"¥:¬z×/?Ñ/?×/NÑ/NÓOÖPr+   c                óæ  a aaa	€ \        4       o	\        4       o\        4       o\        Sn        \        S P                  S P                  S	4      pS	P                  4       pVRP                  R V 4       4      ,          pSP                  S4       \        V4       F  pSP                  V4       K  	  VV	3R lpVV 3R lpSP                  ^,          P                  V4      pVP                  V4      # )z[
When a WindowUpdate frame is received for a stream that has been
completed it is ignored.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚDH2FlowControlTests.test_windowUpdateAfterComplete.<locals>.<genexpr>×  r…  r³   c                  ól   <€ SP                  ^^R7      pSP                  VP                  4       4       R# )rw   rù  N)rW   r
  r°   )rÒ   rÜ  r_  rA   s   * €€r'   Úupdate_windowÚHH2FlowControlTests.test_windowUpdateAfterComplete.<locals>.update_windowÝ  s/   ø€ à !× 8Ñ 8À!ÈqÐ 8Ó QÐØ�N‰NÐ,×6Ñ6Ó8Ö9r+   c                  ó€   <€ \        SP                  4       4      pSP                  R VR,          P                  4       R# )r¦   Nr§   )r¹   r  ÚassertInr:   ©rÒ   r«   rU  r&   s   * €€r'   r$  ÚCH2FlowControlTests.test_windowUpdateAfterComplete.<locals>.validateâ  s-   ø€ ä$ Q§W¡W£YÓ/ˆFð �M‰M˜,¨¨r­
×(8Ñ(8Ö9r+   )r    r
   r   r   r&  r¬   r7  r8  r1   r´   r	  r   r
  r(  r)  )
r&   r«   r  r  rã  r$  r  r_  rU  rA   s
   f      @@@r'   Útest_windowUpdateAfterCompleteÚ1H2FlowControlTests.test_windowUpdateAfterCompleteÊ  sÆ   û€ ô
 ‹NˆÜÓˆÜ‹NˆÜ0ˆÔô $ D×$;Ñ$;¸T×=QÑ=QÐSTÓUˆØ×0Ñ0Ó2ˆØ˜Ÿ™Ñ ?¹Ó ?Ó?Õ?ˆØ	×Ñ˜Ôä˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ö	:ö
	:ð ×%Ñ% aÕ(×4Ñ4°]ÓCˆØ�}‰}˜XÓ&Ð&r+   c                óX  € \        4       p\        4       p\        4       p\        Vn        RR	,          .^,          p\        R V 4       4       pV P                  RR
 RV3.,           p\        WdVR7      pVR
 VP                  VP                  ^\        P                  P                  P                  R7      4       VP                  4       pVRP                  R V 4       4      ,          pVP!                  V4       VP#                  V4       \%        VP'                  4       4      pV U	u. uF;  p	\)        V	\*        P,                  P.                  4      '       g   K/  V	P0                  NK=  	  p
p	V P3                  ^ .V
4       V U	u. uF1  p	\)        V	\*        P,                  P4                  4      '       g   K/  V	NK3  	  pp	V U	u. uF1  p	\)        V	\*        P,                  P6                  4      '       g   K/  V	NK3  	  pp	V P9                  V4       V P9                  V4       R# u up	i u up	i u up	i )zz
When a DATA frame is received at the same time as RST_STREAM,
Twisted does not send WINDOW_UPDATE frames for the stream.
ó    c              3   ó8   "  € T F  p\        V4      x € K  	  R # 5ir"   )r‘   )r¡   r9   s   & r'   r¤   Ú;H2FlowControlTests.test_dataAndRstStream.<locals>.<genexpr>ú  s   é € Ð<±)¨$œC ŸI˜I³)ùs   ‚Nzcontent-lengthr  )r?   r_   r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   rî  	  r…  r³   i @  r§   )r    r
   r   r   r&  Úsumr7  r¬   r¨   re   rÿ  ÚerrorsÚ
ErrorCodesÚINTERNAL_ERRORr1   r´   r	  r
  r¹   r  r—   r5   r6   rT   r  r  r7   rI   r~  )r&   r£   r  r_  Ú	frameDataÚ
bodyLengthr>   r«   r  rA   ÚwindowUpdateFrameIDsÚheadersFramesÚ
dataFramess   &            r'   Útest_dataAndRstStreamÚ(H2FlowControlTests.test_dataAndRstStreamì  sî  € ô
 $“~ˆÜ#Ó%ˆ	Ü‹NˆÜ0ˆÔð
  Õ&Ð'¨!Õ+ˆ	ÜÑ<±)Ó<Ó<Ð=ˆ
Ø×)Ñ)¨#¨2Ð.Ð3CÀZÐ2PÐ1QÕQˆÜ#Ø¸,ô
ˆð �2ˆJØ�‰Ø×,Ñ,Ø¤b§i¡i×&:Ñ&:×&IÑ&Ið -ó ô	
ð $×;Ñ;Ó=ˆØ˜Ÿ™Ñ ?¹Ó ?Ó?Õ?ˆØ	×Ñ˜Ô#ð 	
�‰�|Ô$ô ! §¡Ó!2Ó3ˆñ
 ó 
á�Ü˜!œZ×-Ñ-×?Ñ?×@ô ˆA�KŒKÙð 	ð  
ð
 	×Ñ˜!˜Ð2Ô3ñ
 ó
Ù�!¤¨A¬z×/?Ñ/?×/LÑ/L×!M�AˆA‘vð 	ð 
ñ "(ÓU¡˜A¬:°a¼×9IÑ9I×9SÑ9S×+T—a�a¡ˆ
ÐUØ×Ñ˜Ô'Ø×Ñ˜Ö$ùò 
ùò
ùò Vs$   Ä),HÅHÆ,H"Æ4H"Ç ,H'Ç1H'c                óT  € \        4       p\        V4      pVP                  Vn        \        Vn        \        4       p\        4       pVP                  4       pVP                  V4       VP                  V4       ^pVP                  V P                  VR7      P                  4       pVP                  V4       VP                  4        ^ Vn        VP                  4        VP!                  V4       V P#                  VP%                  4       4       V P'                  VP(                  4       R# )zŽ
Aborting a request associated with a paused connection that's
reached its buffered control frame limit causes that
connection to be aborted.
rž   N)r	   r   ræ  r   r&  r    r
   r1   r	  r
  rE   r7  r°   rÏ   rb  ÚclearÚabortRequestr~  r  r  rc  )r&   rd  rÿ   r£   r  r1   r?   ÚheadersFrameDatas   &       r'   Ú#test_abortRequestWithCircuitBreakerÚ6H2FlowControlTests.test_abortRequestWithCircuitBreaker#	  s  € ô +Ó,ˆÜ! -Ó0ˆ
Ø,×6Ñ6ˆ
ÔÜ$9ˆ
Ô!ä#“~ˆÜ#Ó%ˆ	ð #/×"FÑ"FÓ"HÐØ×!Ñ! )Ô,Ø×ÑÐ 7Ô8ð ˆØ'×9Ñ9Ø×+Ñ+°hð :ó 
ç
‰)‹+ð 	ð 	×ÑÐ 0Ô1ð 	×!Ñ!Ô#Ø34ˆ
Ô0ð 	�‰Ôð 	×Ñ Ô)ð 	×Ñ˜Ÿ™Ó*Ô+ð 	�‰˜	×.Ñ.Ö/r+   r0   N)r}  r€  r�  rƒ  r„  r†  r‡  )ry   rz   r{   r|   r}   r'  r"  r7  r8  r5  r•  r¢  r­  r³  r½  rÂ  rÈ  rÑ  r×  rÝ  ré  rù  rÿ  r~   r   r€   s   @r'   r‰  r‰  «  s‰   ø‡ € ñòÐð *€OòÐò D€OàAÐò+BòZQBòf@@òD8Bòt25òh95òv:Bòx!BòF+ò2Qò@ 'òD5%÷n)0ð )0r+   r‰  c                   ó@   a € ] tR tRt o . ROtR tR tR tR tRt	V t
R# )	ÚHTTP2TransportCheckingiO	  c                ó¢   € \        4       p\        4       p\        Vn        VP	                  VR4       V P                  VP                  VJ 4       R# )zE
L{H2Connection} can be registered with the transport as a producer.
TN)r
   r   r   r&  rê   r  rq  )r&   rU  r_  s   &  r'   Ú"test_registerProducerWithTransportÚ9HTTP2TransportChecking.test_registerProducerWithTransportZ	  s?   € ô ÓˆÜ‹NˆÜ0ˆÔà	×Ñ˜1˜dÔ#Ø�‰˜Ÿ
™
 a˜Ö(r+   c                ó8  a aa	a
€ \        4       p\        4       o	\        4       o\        Sn        \        S P                  . V4      pVP                  4       pVRP                  R V 4       4      ,          pSP                  S	4       S	P                  SR4       \        V4       F  pSP                  V4       K  	  SP                  4        SP                  ^,          o
VV	V
V 3R lpV	V 3R lp\        P                   ! \"        RV4      pVP%                  V4       V# )zd
L{H2Connection} can be paused by its consumer. When paused it stops
sending data to the transport.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚNHTTP2TransportChecking.test_pausingProducerPreventsDataSend.<locals>.<genexpr>r	  r…  r³   Tc                  ó„  <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  \        VR,          \        P                  P                  4      4       SP                  4        SP                  4        SP                  4        SP                  4        SP                  4        S# )r‡  r§   )
r¹   r  r  r‘   r~  r—   r5   r6   rI   rÖ   )rÒ   r«   r_  rU  rŠ  r&   s   * €€€€r'   ÚvalidateNotSentÚTHTTP2TransportChecking.test_pausingProducerPreventsDataSend.<locals>.validateNotSent‰	  s�   ø€ Ü$ Q§W¡W£YÓ/ˆFà×ÑœS ›[¨!Ô,Ø×ÑœZ¨¨r­
´J×4DÑ4D×4NÑ4NÓOÔPØ×ÑÔð ×ÑÔØ×ÑÔØ×ÑÔØ×ÑÔØ"Ð"r+   c                  óº   <€ \        SP                  4       4      pSP                  \        V4      ^4       SP	                  RVR,          P
                  9   4       R# rw  rx  rç  s   * €€r'   rä  ÚUHTTP2TransportChecking.test_pausingProducerPreventsDataSend.<locals>.validateComplete—	  sD   ø€ Ü$ Q§W¡W£YÓ/ˆFð ×ÑœS ›[¨!Ô,Ø�O‰O˜L¨F°2­J×,<Ñ,<Ñ<Ö=r+   râ  )r    r
   r   r   r&  r¬   r'  r1   r´   r	  rê   r   r
  rÏ   r(  r   r  r   r)  )r&   rA   r«   r  r  r
  rä  r  r_  rU  rŠ  s   f       @@@r'   Ú$test_pausingProducerPreventsDataSendÚ;HTTP2TransportChecking.test_pausingProducerPreventsDataSende	  sð   û€ ô
 ‹NˆÜÓˆÜ‹NˆÜ0ˆÔô $ D×$:Ñ$:¸BÀÓBˆØ×0Ñ0Ó2ˆØ˜Ÿ™Ñ ?¹Ó ?Ó?Õ?ˆØ	×Ñ˜ÔØ	×Ñ˜1˜dÔ#ô ˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð 	
×ÑÔð ×3Ñ3°AÕ6ˆ÷	#ð 	#ö	>ô �OŠOœG T¨?Ó;ˆØ	�‰Ð&Ô'àˆr+   c                ó¢  € \        4       p\        4       p\        4       p\        Vn        \        V P                  . V4      pVP                  4       pVRP                  R V 4       4      ,          pVP                  V4       VP                  VR4       \        V4       F  pVP                  V4       K  	  VP                  4        \        VP                  4       4      pV P!                  \#        V4      ^4       V P%                  \'        VR,          \(        P*                  P,                  4      4       V P%                  VP.                  4       R# )zW
L{H2Connection} can be stopped by its producer. That causes it to lose
its transport.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   Ú<HTTP2TransportChecking.test_stopProducing.<locals>.<genexpr>°	  r…  r³   TNr§   )r    r
   r   r   r&  r¬   r'  r1   r´   r	  rê   r   r
  rå   r¹   r  r  r‘   r~  r—   r5   r6   rI   rž  )r&   rA   rU  r_  r«   r  r  s   &      r'   Útest_stopProducingÚ)HTTP2TransportChecking.test_stopProducing£	  s  € ô
 ‹NˆÜÓˆÜ‹NˆÜ0ˆÔô $ D×$:Ñ$:¸BÀÓBˆØ×0Ñ0Ó2ˆØ˜Ÿ™Ñ ?¹Ó ?Ó?Õ?ˆØ	×Ñ˜ÔØ	×Ñ˜1˜dÔ#ô ˜lÖ+ˆDØ�N‰N˜4Ö ñ ,ð
 	
�‰Ôä  §¡£Ó+ˆà×Ñœ˜V› aÔ(Ø×Ñœ F¨2¥J´
×0@Ñ0@×0JÑ0JÓKÔLØ×Ñ˜×*Ñ*Ö+r+   c                óŠ  a a	a
a€ \        RRR4      o	\        RRR4      o
\        4       p\        S	S
R7      p\        4       p\        Vn        VP                  V4       \        S P                  . V4      pVP                  4       pVRP                  R V 4       4      ,          p\        V4       F  pVP                  V4       K  	  VP                  ^,          oS P                  SP                  4       S	4       S P                  SP!                  4       S
4       VP"                  ^,          pV	V
V V3R	 lpVP%                  V4      # )
zc
A L{H2Stream} object correctly passes through host and peer information
from its L{H2Connection}.
ÚTCPz
17.52.24.8i»  z17.188.0.12i}  )ÚhostAddressÚpeerAddressr+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   rP  s   & r'   r¤   ÚEHTTP2TransportChecking.test_passthroughHostAndPeer.<locals>.<genexpr>Ò	  rR  r³   c                  óˆ   <€ SP                  SP                  4       S4       SP                  SP                  4       S4       R # r"   )r  ÚgetHostÚgetPeer)rÒ   r  r  r&   r¬  s   *€€€€r'   r$  ÚDHTTP2TransportChecking.test_passthroughHostAndPeer.<locals>.validateß	  s1   ø€ Ø×Ñ˜VŸ^™^Ó-¨{Ô;Ø×Ñ˜VŸ^™^Ó-¨{Ö;r+   )r   r    r
   r   r   r&  r	  r¬   r'  r1   r´   r   r
  r{  r  r  r  r(  r)  )r&   r£   r  rÿ   r«   r  r  rŠ  r$  r  r  r¬  s   f        @@@r'   Útest_passthroughHostAndPeerÚ2HTTP2TransportChecking.test_passthroughHostAndPeerÂ	  s  û€ ô
 " %¨°sÓ;ˆÜ! %¨¸Ó>ˆä#“~ˆÜ#°ÈÔUˆ	Ü!“^ˆ
Ü$9ˆ
Ô!Ø×!Ñ! )Ô,ä# D×$:Ñ$:¸BÀÓMˆØ#×;Ñ;Ó=ˆØ˜Ÿ™Ñ GÁÓ GÓGÕGˆä˜lÖ+ˆDØ×#Ñ# DÖ)ñ ,ð ×#Ñ# AÕ&ˆØ×Ñ˜Ÿ™Ó)¨;Ô7Ø×Ñ˜Ÿ™Ó)¨;Ô7ð %×<Ñ<¸QÕ?ˆ÷	<ð 	<ð ×*Ñ*¨8Ó4Ð4r+   r0   Nr|  )ry   rz   r{   r|   r'  r  r  r  r  r~   r   r€   s   @r'   r  r  O	  s'   ø‡ € òÐò	)ò<ò|,÷>!5ð !5r+   r  c                   ó*   a € ] tR tRt o RtR tRtV tR# )ÚHTTP2SchedulingTestsiæ	  z°
The H2Connection object schedules certain events (mostly its data sending
loop) using callbacks from the reactor. These tests validate that the calls
are scheduled correctly.
c                óâ  € \         P                  ! 4       p\        V4      pVP                  ! 4       pV P	                  \        V4      ^4       V^ ,          pV P                  VP                  4       4       V P	                  VP                  ^ 4       V P	                  VP                  VP                  4       V P	                  VP                  R4       V P	                  VP                  / 4       R# )ze
When a H2Connection is established it schedules one call to be run as
soon as the reactor has time.
Nr0   )r   ÚClockr   ÚgetDelayedCallsr  r‘   r  ÚactiveÚtimeÚfuncÚ_sendPrioritisedDatarÒ   Úkw)r&   r   r_  ÚcallsÚcalls   &    r'   Ú"test_initiallySchedulesOneDataCallÚ7HTTP2SchedulingTests.test_initiallySchedulesOneDataCallí	  s®   € ô
 —*’*“,ˆÜ˜Ó!ˆà×'Ò'Ó)ˆØ×Ñœ˜U› QÔ'Ø�Q�xˆð 	�‰˜Ÿ™›Ô&Ø×Ñ˜Ÿ™ AÔ&Ø×Ñ˜Ÿ™ A×$:Ñ$:Ô;Ø×Ñ˜Ÿ™ BÔ'Ø×Ñ˜Ÿ™ "Ö%r+   r0   N)ry   rz   r{   r|   r}   r-  r~   r   r€   s   @r'   r"  r"  æ	  s   ø‡ € ñ÷&ð &r+   r"  c                   ó”   a € ] tR tRt o Rt. ROt]! 4       tR tR t	R t
]3R ltR tR tR	 tR
 tR tR tR tR tR tR tRtV tR# )ÚHTTP2TimeoutTestsi
  z8
The L{H2Connection} object times out idle connections.
c                ó(   € VP                   Vn         R# )a™  
Unfortunately, TimeoutMixin does not allow passing an explicit reactor
to test timeouts. For that reason, we need to monkeypatch the method
set up by the TimeoutMixin.

@param connection: The HTTP/2 connection object to patch.
@type connection: L{H2Connection}

@param reactor: The reactor whose callLater method we want.
@type reactor: An object implementing
    L{twisted.internet.interfaces.IReactorTime}
N)ræ  )r&   rÿ   r   s   &&&r'   Úpatch_TimeoutMixin_clockÚ*HTTP2TimeoutTests.patch_TimeoutMixin_clock
  s   € ð  '×0Ñ0ˆ
Ör+   c                ó  € \         P                  ! 4       p\        V4      p^dVn        V P	                  WC4       \        4       p\        V4      Vn        VP                  V4       \        V4       F  pVP                  V4       K  	  W4V3# )a]  
Performs test setup by building a HTTP/2 connection object, a transport
to back it, a reactor to run in, and sending in some initial data as
needed.

@param initialData: The initial HTTP/2 data to be fed into the
    connection after setup.
@type initialData: L{bytes}

@param requestFactory: The L{Request} factory to use with the
    connection.
)r   r$  r   ÚtimeOutr2  r
   r   r&  r	  r   r
  )r&   ÚinitialDatar&  r   rÖ  r  r  s   &&&    r'   ÚinitiateH2ConnectionÚ&HTTP2TimeoutTests.initiateH2Connection#
  s}   € ô —*’*“,ˆÜ˜GÓ$ˆØˆŒØ×%Ñ% dÔ4ä#Ó%ˆ	Ü6°~ÓFˆÔØ×Ñ˜IÔ&ô ˜kÖ*ˆDØ×Ñ˜dÖ#ñ +ð ˜yÐ)Ð)r+   c                óR  € \        V4      pV P                  \        V4      V4       V P                  \	        VR,          \
        P                  P                  4      4       V P                  VR,          P                  V4       V P                  VR,          P                  V4       R# )z¬
Confirm that the data that was sent matches what we expect from a
timeout: namely, that it ends with a GOAWAY frame carrying an
appropriate error code and last stream ID.
Nr§   )
r¹   r  r‘   r  r—   r5   r6   rZ   r[   r\   )r&   r9   Ú
frameCountr_   r^   r«   s   &&&&& r'   ÚassertTimedOutÚ HTTP2TimeoutTests.assertTimedOut?
  sy   € ô ! Ó&ˆà×Ñœ˜V› jÔ1Ø�‰œ
 6¨"¥:¬z×/?Ñ/?×/KÑ/KÓLÔMØ×Ñ˜ �×.Ñ.°	Ô:Ø×Ñ˜ �×2Ñ2°LÖAr+   c                óÖ  € WP                   J d   \        P                  p\        4       pVP	                  4       pV P                  V\        R7      w  rEpWn        VP                  ! ^d4       V P                  VP                  4       ^\        P                  P                  P                  ^ R7       V P                  VP                  4       V P!                  VP"                  4       WEV3# )au  
Does the common setup for tests that want to test the aborting
functionality of the HTTP/2 stack.

@param abortTimeout: The value to use for the abortTimeout. Defaults to
    whatever is set on L{H2Connection.abortTimeout}.
@type abortTimeout: L{int} or L{None}

@return: A tuple of the reactor being used for the connection, the
    connection itself, and the transport.
©r&  ©r:  r_   r^   )Ú_DEFAULTr   ÚabortTimeoutr    r1   r7  r   Úadvancer;  r  rÿ  rñ  rò  ÚNO_ERRORr  rr  r~  rc  )r&   rA  r£   r6  r   rÖ  r  s   &&     r'   ÚprepareAbortTestÚ"HTTP2TimeoutTests.prepareAbortTestL
  sÍ   € ð Ÿ=™=Ó(Ü'×4Ñ4ˆLä#“~ˆØ"×:Ñ:Ó<ˆà#'×#<Ñ#<ØÜ+ð $=ó $
Ñ ˆ�yð )Ôð 	�Š˜Ôà×ÑØ�O‰OÓØÜ—i‘i×*Ñ*×3Ñ3Øð	 	ô 	
ð 	�‰˜	×/Ñ/Ô0Ø×Ñ˜×/Ñ/Ô0à˜iÐ'Ð'r+   c                ó
  € \        4       pVP                  4       pV P                  V\        R7      w  r4pVP	                  4       pVP
                  ! ^c4       V P                  WeP	                  4       4       V P                  VP                  4       VP
                  ! ^4       V P                  VP	                  4       ^\        P                  P                  P                  ^ R7       V P                  VP                  4       R# )zy
When a L{H2Connection} does not receive any data for more than the
time out interval, it closes the connection cleanly.
r>  r?  N)r    r1   r7  r   r  rB  r  r~  rr  r;  rÿ  rñ  rò  rC  r  )r&   r£   r6  r   rÖ  r  Úpreambles   &      r'   Útest_timeoutAfterInactivityÚ-HTTP2TimeoutTests.test_timeoutAfterInactivityr
  sØ   € ô
 $“~ˆØ"×:Ñ:Ó<ˆà#'×#<Ñ#<ØÜ+ð $=ó $
Ñ ˆ�yð —?‘?Ó$ˆð 	�Š˜Ôð 	×Ñ˜§?¡?Ó#4Ô5Ø×Ñ˜×0Ñ0Ô1ð 	�Š˜Ôà×ÑØ�O‰OÓØÜ—i‘i×*Ñ*×3Ñ3Øð	 	ô 	
ð 	�‰˜	×/Ñ/Ö0r+   c                óò  € \        4       pRpV P                  V\        R7      w  r4p\        VP	                  4       4       FA  pVP                  V4       VP                  ! ^c4       V P                  VP                  4       KC  	  VP                  ! ^4       V P                  VP                  4       ^\        P                  P                  P                  ^ R7       V P                  VP                  4       R# )z=
When a L{H2Connection} receives data, the timeout is reset.
r+   r>  r?  N)r    r7  r   r   r1   r
  rB  r~  rr  r;  r  rÿ  rñ  rò  rC  r  )r&   r£   r6  r   rÖ  r  r  s   &      r'   Útest_timeoutResetByRequestDataÚ0HTTP2TimeoutTests.test_timeoutResetByRequestData”
  sÕ   € ô
 $“~ˆØˆà#'×#<Ñ#<ØÜ+ð $=ó $
Ñ ˆ�yô ˜l×BÑBÓDÖEˆDØ×Ñ˜dÔ#ð �OŠO˜BÔð ×Ñ˜Y×4Ñ4Ö5ñ Fð 	�Š˜Ôà×ÑØ�O‰OÓØÜ—i‘i×*Ñ*×3Ñ3Øð	 	ô 	
ð 	�‰˜	×/Ñ/Ö0r+   c                óÜ  a	€ \        4       pRp. o	\        V P                  . V4      pVP                  4       pVRP	                  R V 4       4      ,          pV	3R lpV P                  VVR7      w  rVpVP                  VP                  4       4       VP                  ! ^c4       V P                  \        S	4      ^4       \        ^
4       FH  pS	^ ,          P                  R4       VP                  ! ^c4       V P                  VP                  4       KJ  	  VP                  ! ^4       V P                  VP                  4       ^\         P"                  P$                  P&                  ^R7       R# )z:
When a L{H2Connection} sends data, the timeout is reset.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚDHTTP2TimeoutTests.test_timeoutResetByResponseData.<locals>.<genexpr>Á
  ó   é € Ð>±v°!§¡§ ³vùr³   c                 óB   <€ \        WR 7      pSP                  V4       V# ))Úqueued)r   r¨   )r¬  rR  rö   Úrequestss   && €r'   ÚsaveRequestÚFHTTP2TimeoutTests.test_timeoutResetByResponseData.<locals>.saveRequestÃ
  s   ø€ Ü$ VÔ;ˆCØ�O‰O˜CÔ ØˆJr+   r>  s
   some bytesr?  N)r    r¬   r'  r1   r´   r7  r
  rB  ÚassertEqualsr‘   rÂ   rÃ   r~  rr  r;  r  rÿ  rñ  rò  ÚPROTOCOL_ERROR)
r&   r£   r6  r«   rT  r   rÖ  r  rJ  rS  s
   &        @r'   Útest_timeoutResetByResponseDataÚ1HTTP2TimeoutTests.test_timeoutResetByResponseData¶
  s7  ø€ ô
 $“~ˆØˆØˆä# D×$:Ñ$:¸BÀÓMˆØ"×:Ñ:Ó<ˆØ�s—x‘xÑ>±vÓ>Ó>Õ>ˆõ	ð
 $(×#<Ñ#<ØØ&ð $=ó $
Ñ ˆ�yð
 	×Ñ˜,×>Ñ>Ó@ÔAð 	�Š˜ÔØ×Ñœ#˜h›-¨Ô+ä�r–ˆAà�Q�K×Ñ˜mÔ,Ø�OŠO˜BÔØ×Ñ˜Y×4Ñ4Ö5ñ	 ð 	�Š˜ÔØ×ÑØ�O‰OÓØÜ—i‘i×*Ñ*×9Ñ9Øð	 	ö 	
r+   c                ó¾  € \        4       p\        V P                  . V4      pVP                  4       pVRP	                  R V 4       4      ,          pV P                  V\        R7      w  rEpVP                  ! ^e4       V P                  VP                  4       ^\        P                  P                  P                  ^R7       V P                  VP                  4       R# )zz
When a L{H2Connection} times out with active streams, the error code
returned is L{h2.errors.ErrorCodes.PROTOCOL_ERROR}.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚOHTTP2TimeoutTests.test_timeoutWithProtocolErrorIfStreamsOpen.<locals>.<genexpr>ê
  rP  r³   r>  r?  N)r    r¬   r'  r1   r´   r7  rè   rB  r;  r  rÿ  rñ  rò  rW  r  rr  )r&   r£   r«   r6  r   rÖ  r  s   &      r'   Ú*test_timeoutWithProtocolErrorIfStreamsOpenÚ<HTTP2TimeoutTests.test_timeoutWithProtocolErrorIfStreamsOpenâ
  s¾   € ô
 $“~ˆÜ# D×$:Ñ$:¸BÀÓMˆØ"×:Ñ:Ó<ˆØ�s—x‘xÑ>±vÓ>Ó>Õ>ˆà#'×#<Ñ#<ØÜ/ð $=ó $
Ñ ˆ�yð 	�Š˜Ôà×ÑØ�O‰OÓØÜ—i‘i×*Ñ*×9Ñ9Øð	 	ô 	
ð 	�‰˜	×/Ñ/Ö0r+   c                ó  € \        4       p\        V P                  . V4      pVP                  4       pVRP	                  R V 4       4      ,          pV P                  V\        R7      w  rEpVP                  4       p\        VP                  ! 4       4      pVP                  R4       \        VP                  ! 4       4      p	V P                  V^,
          V	4       VP                  ! ^e4       V P                  VP                  4       V4       R# )zE
When a L{H2Connection} loses its connection it cancels its timeout.
r+   c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir"   r¯   r±   s   & r'   r¤   ÚCHTTP2TimeoutTests.test_noTimeoutIfConnectionLost.<locals>.<genexpr>  rP  r³   r>  r6  N)r    r¬   r'  r1   r´   r7  rè   r  r‘   r%  ÚconnectionLostr  rB  )
r&   r£   r«   r6  r   rÖ  r  ÚsentDataÚoldCallCountÚcurrentCallCounts
   &         r'   Útest_noTimeoutIfConnectionLostÚ0HTTP2TimeoutTests.test_noTimeoutIfConnectionLostü
  sè   € ô $“~ˆÜ# D×$:Ñ$:¸BÀÓMˆØ"×:Ñ:Ó<ˆØ�s—x‘xÑ>±vÓ>Ó>Õ>ˆà#'×#<Ñ#<ØÜ/ð $=ó $
Ñ ˆ�yð
 —?‘?Ó$ˆÜ˜7×2Ò2Ó4Ó5ˆð 	×Ñ˜HÔ%ô ˜w×6Ò6Ó8Ó9ÐØ×Ñ˜¨Õ)Ð+;Ô<ð 	�Š˜ÔØ×Ñ˜Ÿ™Ó*¨HÖ5r+   c                óL  € V P                  4       w  rpVP                  ! ^4       V P                  VP                  4       V P	                  VP
                  4       VP                  ! ^4       V P                  VP                  4       V P                  VP
                  4       R# )zŠ
When a L{H2Connection} has timed the connection out, and the transport
doesn't get torn down within 15 seconds, it gets forcibly closed.
N©rD  rB  r  rr  r~  rc  ©r&   r   rÖ  r  s   &   r'   Ú,test_timeoutEventuallyForcesConnectionClosedÚ>HTTP2TimeoutTests.test_timeoutEventuallyForcesConnectionClosed  s{   € ð
 $(×#8Ñ#8Ó#:Ñ ˆ�yð 	�Š˜ÔØ�‰˜	×/Ñ/Ô0Ø×Ñ˜×/Ñ/Ô0Ø�Š˜ÔØ�‰˜	×/Ñ/Ô0Ø�‰˜	×.Ñ.Ö/r+   c                ó  € V P                  4       w  rpVP                  ! ^4       VP                  R4       VP                  ! ^4       V P                  VP                  4       V P                  VP                  4       R# )z„
When a L{H2Connection} has timed the connection out, getting
C{connectionLost} called on it cancels the forcible connection close.
N)rD  rB  rb  r  rr  r~  rc  rj  s   &   r'   Ú$test_losingConnectionCancelsTheAbortÚ6HTTP2TimeoutTests.test_losingConnectionCancelsTheAbort'  sg   € ð
 $(×#8Ñ#8Ó#:Ñ ˆ�yð 	�Š˜ÔØ×Ñ˜DÔ!ð 	�Š˜ÔØ�‰˜	×/Ñ/Ô0Ø×Ñ˜×/Ñ/Ö0r+   c                óÀ   € V P                  RR7      w  rpVP                  ! R4       V P                  VP                  4       V P	                  VP
                  4       R# )z�
When a L{H2Connection} has timed the connection out but the
C{abortTimeout} is set to L{None}, the connection is never aborted.
N)rA  l        ri  rj  s   &   r'   Ú'test_losingConnectionWithNoAbortTimeOutÚ9HTTP2TimeoutTests.test_losingConnectionWithNoAbortTimeOut7  sP   € ð
 $(×#8Ñ#8ÀdÐ#8Ó#KÑ ˆ�yð 	�Š˜ÔØ�‰˜	×/Ñ/Ô0Ø×Ñ˜×/Ñ/Ö0r+   c                óú   € V P                  4       w  rpVP                  ! ^4       V P                  VP                  4       V P                  VP                  4       VP                  \        P                  4       R# )ze
If a timed out transport doesn't close after 15 seconds, the
L{HTTPChannel} will forcibly close it.
N)rD  rB  r  rr  rc  rb  r   ÚConnectionDonerj  s   &   r'   Ú"test_connectionLostAfterForceCloseÚ4HTTP2TimeoutTests.test_connectionLostAfterForceCloseD  s_   € ð
 $(×#8Ñ#8Ó#:Ñ ˆ�yð 	�Š˜ÔØ�‰˜	×/Ñ/Ô0Ø�‰˜	×.Ñ.Ô/ð
 	×ÑœE×0Ñ0Ö1r+   c                óú  € \        4       p\        V4      pVP                  Vn        ^<Vn        \	        4       p\        4       pVP                  4       pVP                  V4       VP                  V4       \        VP                  VP                  ,           4       FB  pVP                  VP                  ^4      P                  4       4       VP                  ^4       KD  	  V P                  VP                  4       R# )zB
A client that sends only invalid frames is eventually timed out.
N)r	   r   ræ  r5  r    r
   r1   r	  r
  rÂ   rA  re   r°   rB  r  rc  )r&   rd  rÿ   r£   r  r1   rÇ   s   &      r'   Ú,test_timeOutClientThatSendsOnlyInvalidFramesÚ>HTTP2TimeoutTests.test_timeOutClientThatSendsOnlyInvalidFramesU  sÎ   € ô +Ó,ˆä! -Ó0ˆ
Ø,×6Ñ6ˆ
ÔØˆ
Ôä#“~ˆÜ#Ó%ˆ	à".×"FÑ"FÓ"HÐØ×!Ñ! )Ô,Ø×ÑÐ 7Ô8ô �z×)Ñ)¨J×,CÑ,CÕCÖDˆAØ×#Ñ# L×$DÑ$DÀQÓ$G×$QÑ$QÓ$SÔTØ×!Ñ! !Ö$ñ Eð 	�‰˜	×.Ñ.Ö/r+   r0   Nr|  )ry   rz   r{   r|   r}   r'  r  r@  r2  r7  r;  rD  rH  rK  rX  r]  rf  rk  rn  rq  ru  rx  r~   r   r€   s   @r'   r0  r0  
  sp   ø‡ € ñòÐñ ‹x€Hò1ò*ò8Bð -5ô $(òL 1òD 1òD*
òX1ò46ò80ò1ò 1ò2÷"0ð 0r+   r0  c                   óf   a € ] tR tRt o Rt]'       g   ]! R4      '       g   ]tV 3R lR ltRt	V t
R# )ÚEndToEndTestsiq  zC
Tests that run real TCP-based communication with a HTTP/2 server.
ÚOpenSSLc                ó   <€ V ^8„  d   QhRR/# )r‡  ÚreturnNr0   )Úformatr�   s   "€r'   Ú__annotate__ÚEndToEndTests.__annotate__y  s   ø€ ÷ 2ñ 2¨ñ 2r+   c              ƒ  óš  a"  € \        R4      w  r\        RR4      pRVn        \        P                  ! ^ \        V4      VP                  4       4      pVP                  4       P                  oV P                  VP                  4       V3R lp\        V4      G Rj  x€L
 w  rgV P                  VR4       V P                  VR4       R#  L,5i)zB
Twisted's HTTP/2 server can talk to a third-party HTTP/2 client.
z
test.locals   hello worldzapplication/octet-streamTc                  ó²   <€ \         P                  ! R RR7      p V P                  RS R24      pVP                  VP                  3pV P                  4        V# )TF)Úhttp2Úverifyzhttps://127.0.0.1:Ú/)ÚhttpxÚClientÚgetÚhttp_versionrÞ   Úclose)ÚclientÚresponserØ  ÚportNums      €r'   Úrun_http2_queryÚ7EndToEndTests.test_realRequest.<locals>.run_http2_query„  sO   ø€ Ü—\’\¨°UÔ;ˆFØ—z‘zÐ$6°w°i¸qÐ"AÓBˆHØ×+Ñ+¨X×-=Ñ-=Ð>ˆFØ�L‰LŒNØˆMr+   NzHTTP/2)r   r   ÚisLeafr   Ú	listenSSLr   Úoptionsr  ÚportÚ
addCleanupÚstopListeningr   r  )	r&   rÇ   Ú
serverCertÚresourcer”  r�  ÚhttpVersionrÞ   rŽ  s	   &       @r'   Útest_realRequestÚEndToEndTests.test_realRequesty  s©   øé € ô :¸,ÓG‰ˆÜ˜Ð(BÓCˆØˆŒÜ× Ò  ¤D¨£N°J×4FÑ4FÓ4HÓIˆØ—,‘,“.×%Ñ%ˆØ�‰˜×*Ñ*Ô+õ	ô (5°_Ó'E×!EÑˆØ×Ñ˜ hÔ/Ø×Ñ˜ .Ö1ñ "Fùs   ƒBCÂC	Â-Cr0   N)ry   rz   r{   r|   r}   r  r   r  rš  r~   r   r€   s   @r'   r{  r{  q  s(   ø‡ € ñ÷ ‘] 9×-Ò-Øˆ÷2ö 2r+   r{  rv   )Pr}   rX  Úzope.interfacer   r   r‡  Útwisted.internetr   r   r   r   Útwisted.internet.addressr   Útwisted.internet.testingr	   r
   Útwisted.internet.threadsr   Útwisted.pythonr   Útwisted.python.compatr   Útwisted.python.reflectr   Útwisted.test.test_internetr   Útwisted.test.test_sslverifyr   Útwisted.trialr   Útwisted.webr   Útwisted.web.serverr   Útwisted.web.staticr   Útwisted.web.test.test_httpr   r   r   r   r   r   r   r  rÿ  Ú	h2.errorsÚh2.exceptionsr5   rý   Úhpack.hpackr   r   Útwisted.web._http2r   ÚImportErrorr    rƒ   r¬   rµ   r¹   rÍ   r»   rl  rË   rz  rã   r‰  rè   r•  rí   ÚNotifyingRequestFactoryProxyrú   ÚTestCaser  r‰  r  r"  r0  r{  r0   r+   r'   Ú<module>r²     sÖ  ðñó ç 7ã ç 8Ó 8Ý 0ß HÝ 2Ý "Ý +Ý 0Ý 4Ý IÝ "Ý Ý #Ý #÷÷ ñ ð 
€ð*ó ÛÛÛÛß,å/÷añ a÷H'ñ 'ôTôB3ò.ô(˜Ÿ™ô ñ( 3Ð3EÓFÐ ô˜4Ÿ<™<ô ñD 5Ð5IÓJÐ ô%Ð#7ô %ñ  %=Ø ó%Ð !ô
	5˜4Ÿ<™<ô 	5ñ 5Ð5IÓJÐ ÷Cñ Cñ0  8Ð8OÓPÐ ÷Mñ Mô"K0�x×(Ñ(Ð*:ô K0ô\(a
0˜×*Ñ*Ð,<ô a
0ôHT5˜X×.Ñ.Ð0@ô T5ôn&˜8×,Ñ,Ð.>ô &ô8l0˜×)Ñ)Ð+;ô l0ô^2�H×%Ñ%ö 2øðY ô *Ø)ƒFð*ús   Á>"G Ç	GÇG