403Webshell
Server IP : 217.160.0.64  /  Your IP : 216.73.217.111
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67269618 ( 67269618)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/kunden/usr/lib/python3/dist-packages/breezy/bzr/smart/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/kunden/usr/lib/python3/dist-packages/breezy/bzr/smart/__pycache__/protocol.cpython-313.pyc
�

p��ga���8�SrSSKrSSKrSSKrSSKJr SSKJr SSKJ	r	J
r
 SSKrSSKJ
r
JrJr SSKJrJr S	S
KJrJr SrSrS
r\=rr"SS\R45rSrSrSr"SS5r"SS5r "SS\ 5r!"SS\!5r"Sr#Sr$"SS\%5r&"SS 5r'"S!S"\'5r("S#S$\'5r)"S%S&\ \\RT5r+"S'S(\+5r,S3S)jr-"S*S+\'5r."S,S-5r/"S.S/\/5r0S0r1"S1S2\/\5r2g)4z\Wire-level encoding and decoding of requests and responses for the smart
client and server.
�N)�deque)�BytesIO)�bdecode_as_tuple�bencode�)�debug�errors�osutils)�log_exception_quietly�mutter�)�message�requestsbzr request 2
sbzr response 2
sbzr message 3 (bzr 1.6)
c��\rSrSrSrSrSrg)�SmartMessageHandlerError�-z;The message handler raised an exception:
%(traceback_text)sc���SSKnUuUlUlUlXlURURURUR5nSR
U5Ulg)Nr�)�	traceback�exc_type�	exc_value�exc_tb�exc_info�format_exception�join�traceback_text)�selfrr�traceback_stringss    �;/usr/lib/python3/dist-packages/breezy/bzr/smart/protocol.py�__init__�!SmartMessageHandlerError.__init__0sV���6>�2��
�t�~�t�{� �
�%�6�6��M�M�4�>�>�4�;�;�
��!�g�g�&7�8���)rrrrrN)�__name__�
__module__�__qualname__�__firstlineno__�_fmtr �__static_attributes__�r"rrr-s��I�D�	9r"rc�8�UR5n[U5$�N)�readline�
_decode_tuple)�	from_file�req_lines  r�_recv_tupler0<s���!�!�#�H���"�"r"c���UbUS:XagURS5(d%[R"SRU55e[	USSRS55$)Nr"�
zrequest {!r} not terminated����)�endswithr	�SmartProtocolError�format�tuple�split)r/s rr-r-As[����8�s�?�����U�#�#��'�'�(E�(L�(L�X�(V�W�W���#�2��$�$�W�-�.�.r"c�|�UH#n[U[5(dM[U5e SRU5S-$)z&Encode the tuple args to a bytestream.r4r2)�
isinstance�str�	TypeErrorr)�args�args  r�
_encode_tupler@Is9�����c�3����D�/�!���<�<����%�%r"c�0�\rSrSrSrSrSrSrSrSr	g)	�	Requester�QzMAbstract base class for an object that can issue requests on a smart
medium.
c�,�[UR5e)z>Make a remote call.

:param args: the arguments of this call.
)�NotImplementedError�call�rr>s  rrF�Requester.callVs��
"�$�)�)�,�,r"c�,�[UR5e)z�Make a remote call with a body.

:param args: the arguments of this call.
:type body: str
:param body: the body to send with the request.
)rE�call_with_body_bytes�rr>�bodys   rrJ�Requester.call_with_body_bytes]s��"�$�";�";�<�<r"c�,�[UR5e)z�Make a remote call with a readv array.

:param args: the arguments of this call.
:type body: iterable of (start, length) tuples.
:param body: the readv ranges to send with this request.
)rE�call_with_body_readv_arrayrKs   rrO�$Requester.call_with_body_readv_arrayfs��"�$�"A�"A�B�Br"c�,�[UR5er+)rE�set_headers�r�headerss  rrR�Requester.set_headersos��!�$�"2�"2�3�3r"r)N)
r#r$r%r&�__doc__rFrJrOrRr(r)r"rrBrBQs���-�=�C�4r"rBc�$�\rSrSrSrSrSrSrg)�SmartProtocolBase�sz$Methods common to client and server.c�B�SRS[U5-US45$)z!Encode body as a bulk data chunk.r"s%d
�done
)r�len)rrLs  r�_encode_bulk_data�#SmartProtocolBase._encode_bulk_dataxs!���x�x��3�t�9�,�d�I�>�?�?r"c�h�/nUHup4URSX44-5 M SRU5$�zSerialise a readv offset list.s%d,%dr2��appendr�r�offsets�txt�start�lengths     r�_serialise_offsets�$SmartProtocolBase._serialise_offsets|�4����$�M�E��J�J�x�5�/�1�2�%��z�z�#��r"r)N)r#r$r%r&rVr]rhr(r)r"rrXrXss��.�@�r"rXc�B�\rSrSrSrSSjrSrSrSrSr	S	r
S
rg)�SmartServerRequestProtocolOne�z<Server-side encoding and decoding logic for smart version 1.Nc��XlX0lX@lSUlSUlSUlSUlSUlSUlX l	g)Nr"F)
�_backing_transport�_root_client_path�
_jail_root�unused_data�	_finished�	in_buffer�_has_dispatchedr�
_body_decoder�_write_func)r�backing_transport�
write_func�root_client_path�	jail_roots     rr �&SmartServerRequestProtocolOne.__init__�sH��#4��!1��#�����������$������!���%�r"c	��[U[5(d[U5eU=RU-
slUR(GdSUR;agSUlURRSS5uo lUS-
n[
U5n[R"UR[RURURS9UlURRU5 URR(a=URUlSUlUR!URR"5 UR(Ga�UR<(a'U=RUR-
slSUlgUR>c[A5UlUR>RCUR5 UR>RUlUR>RE5nURRGU5 UR>R(a@URRI5 URR(d[KS5eURR"b>UR!URR"5 URUlSUlgURR(a[KS5egg![$a e[&R(a�n[&R*"SR-UR.R1S555n[R2"S	[5U5R7S
545nUR!U5 SnAgSnAf[8aSn[;5 UR![R2"S	[5U5R7S
5455 SnAgSnAff=f)
zfTake bytes, and advance the internal state machine appropriately.

:param data: must be a byte string
r2NTr
��commandsrzr{r"zbad request '{}'�ascii�error�utf-8z"no more body, request not finishedz)no response and we have finished reading.)&r;�bytes�
ValueErrorrtrur9r-r�SmartServerRequestHandlerro�request_handlersrprq�
args_received�finished_readingrr�_send_response�response�KeyboardInterruptr	�UnknownSmartMethodr6r7�verb�decode�FailedSmartServerResponser<�encode�	Exceptionrrsrv�LengthPrefixedBodyDecoder�accept_bytes�read_pending_data�accept_body�end_of_body�AssertionError)	r�data�
first_line�req_args�err�protocol_error�failure�	exception�	body_datas	         rr��*SmartServerRequestProtocolOne.accept_bytes�s��
�$��&�&��T�"�"����$����#�#�#��D�N�N�*��#'�D� �#
�-1�^�^�-A�-A�%��-K�*�
�N��e�#�
�(��4��&�@�@��+�+�$�5�5�%)�%;�%;�"�o�o�	 ������*�*�8�4��<�<�0�0�'+�~�~�D�$�%(�D�N��'�'����(=�(=�>�,�����~�~�� � �D�N�N�2� �!$�����!�!�)�%>�%@��"����+�+�D�N�N�;�!�/�/�;�;�D�N��*�*�<�<�>�I��L�L�$�$�Y�/��!�!�2�2����(�(�*��|�|�4�4�(�)M�N�N��|�|�$�$�0��#�#�D�L�L�$9�$9�:�#'�>�>�� �!$����<�<�0�0�(�)T�U�U�1�- ��+%�
���,�,�
�!'�!:�!:�&�-�-�c�h�h�o�o�g�.F�G�"��"�;�;��s�>�2�9�9�'�B�C����#�#�G�,����
�%�'��#�#��5�5�!�3�y�>�#8�#8��#A�B���
��
�s'�!C.L�P� A?N$�$
P�1A	O?�?Pc�|�UR(a[S5eURnURnSUlUR	5 URU5 UR
[U55 UbC[U[5(d[U5eURU5nUR
U5 gg)�4Send a smart server response down the output stream.�response already sentTN)rsr�r>rL�_write_protocol_version� _write_success_or_failure_prefixrwr@r;r�r�r])rr�r>rLr�s     rr��,SmartServerRequestProtocolOne._send_response�s����>�>� �!8�9�9��}�}���}�}������$�$�&��-�-�h�7�����t�,�-����d�E�*�*� ��&�&��)�)�$�/�D����T�"�	r"c��g�zXWrite any prefixes this protocol requires.

Version one doesn't send protocol versions.
Nr)�rs rr��5SmartServerRequestProtocolOne._write_protocol_version���r"c�$�UR5 g)z�Write the protocol specific success/failure prefix.

For SmartServerRequestProtocolOne this is omitted but we
call is_successful to ensure that the response is valid.
N)�
is_successful�rr�s  rr��>SmartServerRequestProtocolOne._write_success_or_failure_prefix�s��	��� r"c�v�UR(agURcgURR5$�Nrr
)rsrv�next_read_sizer�s rr��,SmartServerRequestProtocolOne.next_read_size�s0���>�>�����%���%�%�4�4�6�6r")
rorvrsrurqrprwrtrrr)�/N)r#r$r%r&rVr r�r�r�r�r�r(r)r"rrlrl�s-��F�NR�&�IV�V#� �!�7r"rlc�2�\rSrSrSr\r\rSr	Sr
SrSrg)�SmartServerRequestProtocolTwoizwVersion two of the server side of the smart protocol.

This prefixes responses with the value of RESPONSE_VERSION_TWO.
c�t�UR5(aURS5 gURS5 g)z3Write the protocol specific success/failure prefix.�success
�failed
N)r�rwr�s  rr��>SmartServerRequestProtocolTwo._write_success_or_failure_prefixs-���!�!�#�#����\�*����[�)r"c�:�URUR5 g)zaWrite any prefixes this protocol requires.

Version two sends the value of RESPONSE_VERSION_TWO.
N)rw�response_markerr�s rr��5SmartServerRequestProtocolTwo._write_protocol_versions��
	
����-�-�.r"c�(�UR(a[S5eSUlUR5 URU5 UR	[UR55 URbo[UR[5(d[S5eURb[S5eURUR5nUR	U5 gURb![URUR5 gg)r�r�TNzbody must be bytesz'body_stream and body cannot both be set)
rsr�r�r�rwr@r>rLr;r��body_streamr]�_send_stream)rr�r�s   rr��,SmartServerRequestProtocolTwo._send_responses����>�>� �!8�9�9�����$�$�&��-�-�h�7�����x�}�}�5�6��=�=�$��h�m�m�U�3�3�$�%9�:�:��#�#�/�$�%N�O�O��)�)�(�-�-�8�D����T�"�
�
!�
!�
-���-�-�t�/?�/?�@�.r")rsN)
r#r$r%r&rV�RESPONSE_VERSION_TWOr��REQUEST_VERSION_TWO�request_markerr�r�r�r(r)r"rr�r�s#���
+�O�(�N�*�/�Ar"r�c�:�U"S5 [X5 U"S5 g)Nschunked
sEND
)�_send_chunks)�streamrys  rr�r�1s���|����$��x�r"c�p�UH�n[U[5(a6SR[U55R	S5U-nU"U5 MN[U[
R5(a U"S5 [URU5  g[R"SRU55e g)Nz{:x}
r�sERR
z9Chunks must be str or FailedSmartServerResponse, got {!r})r;r�r7r\r�rr�r�r>r	�BzrError)r�ry�chunkr�s    rr�r�7s������e�U�#�#��O�O�C��J�/�7�7��@�5�H�D��t��
��w�@�@�
A�
A��x� �����Z�0���/�/�K�R�R����
�r"c�"�\rSrSrSrSSjrSrg)�_NeedMoreBytesiHz[Raise this inside a _StatefulDecoder to stop decoding until more bytes
have been received.
Nc��Xlg)z�Constructor.

:param count: the total number of bytes needed by the current state.
    May be None if the number of bytes needed is unknown.
N��count)rr�s  rr �_NeedMoreBytes.__init__Ms	���
r"r�r+)r#r$r%r&rVr r(r)r"rr�r�Hs���r"r�c�6�\rSrSrSrSrSrSrSrSr	Sr
g	)
�_StatefulDecoderiVa�Base class for writing state machines to decode byte streams.

Subclasses should provide a self.state_accept attribute that accepts bytes
and, if appropriate, updates self.state_accept to a different function.
accept_bytes will call state_accept as often as necessary to make sure the
state machine has progressed as far as possible before it returns.

See ProtocolThreeDecoder for an example subclass.
c�X�SUl/UlSUlSUlSUlSUlg)NFrr")r��_in_buffer_list�_in_buffer_lenrr�
bytes_left�_number_needed_bytesr�s rr �_StatefulDecoder.__init__as1�� %���!������������$(��!r"c�&�[UR5S:XaURS$SRUR5n[U5UR:wa,[	SR
"UR6[U55eU/UlU$)Nr
rr"z7Length of buffer did not match expected value: {} != {})r\r�rr�r�r7)rrts  r�_get_in_buffer�_StatefulDecoder._get_in_bufferis����t�#�#�$��)��'�'��*�*��H�H�T�1�1�2�	��y�>�T�0�0�0� �I�P�P��(�(���I��	�
�!*�{����r"c���[UR5S:Xa[S5e[URS5U:�aURSSU$UR5nUSU$)aGrab X bytes from the input_buffer.

Callers should have already checked that self._in_buffer_len is >
count. Note, this does not consume the bytes from the buffer. The
caller will still need to call _get_in_buffer() and then
_set_in_buffer() if they actually need to consume the bytes.
rzHCallers must be sure we have buffered bytes before calling _get_in_bytesN)r\r�r�r�)rr��in_bufs   r�
_get_in_bytes�_StatefulDecoder._get_in_byteswsw���t�#�#�$��)� �0��
��t�#�#�A�&�'�%�/��'�'��*�6�E�2�2��$�$�&���f�u�~�r"c��Ub9[U[5(d[U5eU/Ul[	U5Ulg/UlSUlg�Nr)r;r�r=r�r\r�)r�new_bufs  r�_set_in_buffer�_StatefulDecoder._set_in_buffer�sF�����g�u�-�-���(�(�$+�9�D� �"%�g�,�D��#%�D� �"#�D�r"c���[U[5(d[U5eSUlURRU5 U=R[U5-
slURnUR5 X R:wa.URnUR5 X R:waM-gg![anURUlSnAgSnAff=f)z�Decode as much of bytes as possible.

If 'new_buf' contains too much data it will be appended to
self.unused_data.

finished_reading will be set when no more data is required.  Further
data will be appended to self.unused_data.
N)r;r�r=r�r�rbr�r\�state_acceptr�r�)rr��
current_state�es    rr��_StatefulDecoder.accept_bytes�s����'�5�)�)��G�$�$�$(��!�	
���#�#�G�,����s�7�|�+��
	0� �-�-�M������#4�#4�4�!%� 1� 1�
��!�!�#� �#4�#4�4���	0�()���D�%�%��	0�s�"AB<�<
C!�C�C!)r�r�r�r�r�rrN)r#r$r%r&rVr r�r�r�r�r(r)r"rr�r�Vs ���)���*$�0r"r�c�N�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
Srg
)�ChunkedBodyDecoderi�z�Decoder for chunked body data.

This is very similar the HTTP's chunked encoding.  See the description of
streamed body data in `doc/developers/network-protocol.txt` for details.
c��[RU5 URUlSUl[5UlSUlSUlg�NF)	r�r �_state_accept_expecting_headerr��chunk_in_progressr�chunks�error�error_in_progressr�s rr �ChunkedBodyDecoder.__init__�s>���!�!�$�'� �?�?���!%����g�����
�!%��r"c��URUR:XaURS-$URUR:XaURS:XaggURUR
:XagURUR:Xa"[S[S5UR-
5$[SRUR55e)N�r�r
zchunked
zImpossible state: {!r})r��_state_accept_reading_chunkr��_state_accept_expecting_lengthr��_state_accept_reading_unusedr��maxr\r�r7r�s rr��!ChunkedBodyDecoder.next_read_size�s������� @� @�@��?�?�Q�&�&�
�
�
�$�"E�"E�
E��"�"�a�'���
�
�
�$�"C�"C�
C��
�
�
�$�"E�"E�
E��q�#�k�*�T�-@�-@�@�A�A� �!9�!@�!@��AR�AR�!S�T�Tr"c�X�URR5$![a gf=fr+)r��popleft�
IndexErrorr�s r�read_next_chunk�"ChunkedBodyDecoder.read_next_chunk�s,��	��;�;�&�&�(�(���	��	�s��
)�)c��UR5nURS5nUS:Xa[S5eUSUnURXS-S5 U$�Nr2r3r
)r��findr�r�)rr��pos�lines    r�
_extract_line� ChunkedBodyDecoder._extract_line�sY���$�$�&���k�k�%� ���"�9�!��#�#��d�s�|�����F��7�9�-�.��r"c�2�UR5Ul/UlSUlURUlUR(aK[UR5nURR[R"U55 SUlSUl
g)NrT)r�rrr�r�r�r�r�r8r�r�rbrr�r�)r�
error_argss  rrs�ChunkedBodyDecoder._finished�su���.�.�0���!������ �=�=����:�:��t�5�5�6�J��K�K���w�@�@��L�M�%)�D�"� $��r"c��UR5nUS:XaURUlg[R"SRU55e)NschunkedzBad chunked body header: "{}")rr�r�r	r6r7�r�prefixs  rr��1ChunkedBodyDecoder._state_accept_expecting_header�sG���#�#�%���Z�� $� C� C�D���+�+�/�6�6�v�>��
r"c���UR5nUS:XaSUl/UlUR5 gUS:XaUR	5 g[US5UlSUlURUl	g)NsERRTsEND�r")
rr�r�r�rs�intr�r�r�r�rs  rr��1ChunkedBodyDecoder._state_accept_expecting_lengthsp���#�#�%���V���D�J�%'�D�"��/�/�1��
�v�
�
�N�N���!�&�"�o�D�O�%(�D�"� $� @� @�D�r"c��UR5n[U5nU=RUSUR-
slUR	XRS5 U=RU-slURS::a|SUlUR
(a&URRUR5 O%URRUR5 SUlURUl
ggr�)r�r\r�r�r�r�r�rbr�r�r�)rr��
in_buffer_lens   rr��.ChunkedBodyDecoder._state_accept_reading_chunks����$�$�&���F��
����&�):�4�?�?�";�;�����F�?�?�#4�5�6����=�(���?�?�a��"�D�O��z�z��&�&�-�-�d�.D�.D�E����"�"�4�#9�#9�:�%)�D�"� $� C� C�D�� r"c�X�U=RUR5-
sl/Ulgr+)rrr�r�r�s rr��/ChunkedBodyDecoder._state_accept_reading_unused%s$�����D�/�/�1�1��!��r")
r�r�r�r�r�r�r�r�r�rrN)r#r$r%r&rVr r�r�rrsr�r�r�r�r(r)r"rr�r��s7���&�U�.�
�	%��A�$D� "r"r�c�N�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
Srg
)r�i*z&Decodes the length-prefixed bulk data.c��[RU5 URUlURUlSUlSUlg�Nr")r�r r�r��_state_read_no_data�
state_read�_body�_trailer_bufferr�s rr �"LengthPrefixedBodyDecoder.__init__-s:���!�!�$�'� �?�?����2�2�����
�"��r"c���URbURS-$URUR:XaS[UR5-
$URUR
:Xagg)N��r
)r�r��_state_accept_reading_trailerr\rr�r�s rr��(LengthPrefixedBodyDecoder.next_read_size4se���?�?�&��?�?�Q�&�&�
�
�
�$�"D�"D�
D��s�4�/�/�0�0�0�
�
�
�$�"E�"E�
E��r"c�"�UR5$)z.Return any pending data that has been decoded.)rr�s rr��+LengthPrefixedBodyDecoder.read_pending_dataDs����� � r"c���UR5nURS5nUS:Xag[USU5UlUR	XS-S5 UR
UlURUlgr)	r�rrr�r��_state_accept_reading_bodyr��_state_read_body_bufferr)rr�rs   rr��8LengthPrefixedBodyDecoder._state_accept_expecting_lengthHsl���$�$�&���k�k�%� ���"�9���f�T�c�l�+������F��7�9�-�.� �;�;����6�6��r"c��UR5nU=RU-
slU=R[U5-slUR	S5 URS::aeURS:wa<URURSUlURSURUlSUlURUlggr�)r�rr�r\r�rr#r�)rr�s  rr(�4LengthPrefixedBodyDecoder._state_accept_reading_bodyRs����$�$�&���
�
�f��
����3�v�;�&�����D�!��?�?�a�����!�#�'+�z�z�$�/�/�2C�'D��$�!�Z�Z�(9�$�/�/�:��
�"�D�O� $� B� B�D��
 r"c��U=RUR5-
slURS5 URRS5(a6UR[	S5SUlURUlSUlgg)Nr[T)	rr�r��
startswithr\rrr�r�r�r�s rr#�7LengthPrefixedBodyDecoder._state_accept_reading_trailer_sx������ 3� 3� 5�5�����D�!����*�*�9�5�5�#�3�3�C�	�N�4D�E�D�� $� A� A�D��$(�D�!�6r"c�l�U=RUR5-
slURS5 gr+�rrr�r�r�s rr��6LengthPrefixedBodyDecoder._state_accept_reading_unusedi�*�����D�/�/�1�1�����D�!r"c��grr)r�s rr�-LengthPrefixedBodyDecoder._state_read_no_datams��r"c�,�URnSUlU$r)r�r�results  rr)�1LengthPrefixedBodyDecoder._state_read_body_bufferps��������
��
r")rrr�r�r�rrrN)r#r$r%r&rVr r�r�r�r(r#r�rr)r(r)r"rr�r�*s3��0�#�� !�7�C�)�"��r"r�c��\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSSjr
SrS
rSSjrSrSrSrSrSrg)�SmartClientRequestProtocolOneivz-The client-side protocol for smart version 1.c�H�XlSUlSUlSUlSUlg)z�Construct a SmartClientRequestProtocolOne.

:param request: A SmartClientMediumRequest to serialise onto and
    deserialise from.
N)�_request�_body_buffer�_request_start_time�
_last_verb�_headers)rrs  rr �&SmartClientRequestProtocolOne.__init__{s'�� �
� ���#'�� ������
r"c�$�[U5Ulgr+)�dictrArSs  rrR�)SmartClientRequestProtocolOne.set_headers�s
���W�
��
r"c��S[R;a~[S[U5SS5 [	UR
RSS5b*[SUR
RR5 [R"5Ul
URU5 UR
R5 USUl
g)N�hpss�hpss call:   %sr
r3�base�             (to %s)r)r�debug_flagsr�repr�getattrr=�_mediumrIr
�perf_counterr?�_write_args�finished_writingr@rGs  rrF�"SmartClientRequestProtocolOne.call�s����U�&�&�&��$�d�4�j��2�&6�7��t�}�}�,�,�f�d�;�G��-�t�}�}�/D�/D�/I�/I�J�'.�';�';�'=�D�$�������
�
�&�&�(��q�'��r"c�\�S[R;a�[S[U5SSUSS5 [	UR
RSS5b*[SUR
RR5 [S	[U55 [R"5UlS
[R;a[SU5 URU5 URU5nUR
RU5 UR
R5 USUlg)
�yMake a remote call of args with body bytes 'body'.

After calling this, call read_response_tuple to find the result out.
rG�hpss call w/body: %s (%r...)r
r3N��_path�                  (to %s)�              %d bytes�
hpssdetailzhpss body content: %sr)rrKrrLrMr=rNrWr\r
rOr?rPr]r�rQr@)rr>rLr�s    rrJ�2SmartClientRequestProtocolOne.call_with_body_bytes�s���
�U�&�&�&��1�4��:�a��3C�T�#�2�Y�O��t�}�}�,�,�g�t�<�H��2�D�M�M�4I�4I�4O�4O�P��+�S��Y�7�'.�';�';�'=�D�$��u�0�0�0��.��5�������&�&�t�,���
�
�"�"�5�)��
�
�&�&�(��q�'��r"c�^�S[R;a~[S[U5SS5 [	UR
RSS5b*[SUR
RR5 [R"5Ul
URU5 URU5nURU5nUR
RU5 UR
R5 S[R;a[S[!U55 US	Ulg)
��Make a remote call with a readv array.

The body is encoded with one line per readv offset pair. The numbers in
each pair are separated by a comma, and no trailing \\n is emitted.
rG�hpss call w/readv: %sr
r3rWNrX�'              %d bytes in readv requestr)rrKrrLrMr=rNrWr
rOr?rPrhr]r�rQr\r@)rr>rL�readv_bytesr�s     rrO�8SmartClientRequestProtocolOne.call_with_body_readv_array�s����U�&�&�&��*�D��J�q��,<�=��t�}�}�,�,�g�t�<�H��2�D�M�M�4I�4I�4O�4O�P�'.�';�';�'=�D�$�������-�-�d�3���&�&�{�3���
�
�"�"�5�)��
�
�&�&�(��U�&�&�&��<�c�+�>N�O��q�'��r"c��URR5 URR5 [R"US5er�)r=rQr�r	r�)rr>r�s   r�call_with_body_stream�3SmartClientRequestProtocolOne.call_with_body_stream�s9��	
�
�
�&�&�(��
�
�&�&�(��'�'��Q��0�0r"c�8�URR5 g)z�After expecting a body, a response code may indicate one otherwise.

This method lets the domain client inform the protocol that no body
will be transmitted. This is a terminal method: after calling it the
protocol is not able to be used further.
N)r=r�r�s r�cancel_read_body�.SmartClientRequestProtocolOne.cancel_read_body�s��	
�
�
�&�&�(r"c��UR5nS[R;agURbB[	S[
R"5UR-
[U5SS5 SUlU$[	S[U5SS5 U$)NrGz   result:   %6.3fs  %sr
r3z   result:   %s)r0rrKr?rr
rOrLr7s  r�_read_response_tuple�2SmartClientRequestProtocolOne._read_response_tuple�s����!�!�#���U�&�&�&��'�'�3��-��(�(�*�T�-E�-E�E���L��2�&��
,0��(��
��(�$�v�,�q��*<�=��
r"c��UR5nURU5 URU5 U(dURR	5 U$)�GRead a response tuple from the wire.

This should only be called once.
)ri�_response_is_unknown_method�_raise_args_if_errorr=r�)r�expect_bodyr8s   r�read_response_tuple�1SmartClientRequestProtocolOne.read_response_tuple�sF��
�*�*�,���(�(��0��!�!�&�)���M�M�*�*�,��
r"c�~�/SQnUSU;a0URR5 [R"U5eg)N)snorepositorys
NoSuchFiles
FileExistssDirectoryNotEmptysShortReadvErrorsUnicodeEncodeErrorsUnicodeDecodeErrors
ReadOnlyErrorsnobranchsNoSuchRevisionsnosuchrevisionsLockContentionsUnlockableTransports
LockFaileds
TokenMismatchs	ReadErrorsPermissionDeniedr)r=r�r	�ErrorFromSmartServer)r�result_tuple�v1_error_codess   rrn�2SmartClientRequestProtocolOne._raise_args_if_error�s=��
��&��?�n�,��M�M�*�*�,��-�-�l�;�;�-r"c���USSUR-S-4:XdUSSUR-4:Xa:URR5 [R"UR5eg)aRaise UnexpectedSmartServerResponse if the response is an 'unknonwn
method' response to the request.

:param response: The response from a smart client call_expecting_body
    call.
:param verb: The verb used in that call.
:raises: UnexpectedSmartServerResponse
r�s/Generic bzr smart protocol error: bad request '�'s3Generic bzr smart protocol error: bad request u'%s'N)r@r=r�r	r�)rrts  rrm�9SmartClientRequestProtocolOne._response_is_unknown_methodsp����>����P�SW�W�
�
���B�T�_�_�T�
�
�

�M�M�*�*�,��+�+�D�O�O�<�<�

r"c��URbURRU5$[5nUR(diURRUR
55nUS:Xa[R"S5eURU5 UR(dMiURR5 [UR55UlS[R;a-[S[URR!555 URRU5$)z�Read bytes from the body, decoding into a byte stream.

We read all bytes at once to ensure we've checked the trailer for
errors, and then feed the buffer back as read_body_bytes is called.
r"z,Connection lost while reading response body.rGz               %d body bytes read)r>�readr�r�r=�
read_bytesr�r	�ConnectionResetr�rr�rrKrr\�getvalue)rr�rvr�s    r�read_body_bytes�-SmartClientRequestProtocolOne.read_body_bytess�����(��$�$�)�)�%�0�0�1�3�
��0�0��M�M�,�,�]�-I�-I�-K�L�E���|��,�,�B���
�&�&�u�-� �0�0�0�	
�
�
�&�&�(�#�M�$C�$C�$E�F����U�&�&�&��2�C��8I�8I�8R�8R�8T�4U�
�� � �%�%�e�,�,r"c�H�[URR55$)z(Receive a tuple from the medium request.)r-r=�	read_liner�s rr0�)SmartClientRequestProtocolOne._recv_tuple2s���T�]�]�4�4�6�7�7r"c��URS5 UR5nUS:XagUS:Xag[R"SR	U55e)z-Return protocol version number of the server.shello)�ok�1r
)r��2r�zbad response {!r})rFrpr	r6r7)r�resps  r�
query_version�+SmartClientRequestProtocolOne.query_version6sO���	�	�(���'�'�)���=� ��
�]�
"���+�+�,?�,F�,F�t�,L�M�Mr"c�p�UR5 [U5nURRU5 gr+)r�r@r=r�)rr>r�s   rrP�)SmartClientRequestProtocolOne._write_argsAs*���$�$�&��d�#���
�
�"�"�5�)r"c��gr�r)r�s rr��5SmartClientRequestProtocolOne._write_protocol_versionFr�r")r>rAr@r=r?N�F)r3)r#r$r%r&rVr rRrFrJrOrcrfrirprnrmrr0r�rPr�r(r)r"rr;r;vsX��8�
�&�"�"�&"�(1�)��
�<�:=�(-�68�	N�*�
r"r;c�6�\rSrSrSr\r\rSSjr	Sr
SrSrg)	�SmartClientRequestProtocolTwoiMzxVersion two of the client side of the smart protocol.

This prefixes the request with the value of REQUEST_VERSION_TWO.
c�X�URR5nX R:wa0URR5 [R
"U5eURR5n[RU5nURU5 US:Xa*SUl	U(dURR5 U$US:Xa7SUl	URR5 [R"U5e[R"SRU55e)rlr�Tr�Fzbad protocol status {!r})
r=r�r�r�r	�UnexpectedProtocolVersionMarkerr;rirm�response_statusrsr6r7)rro�versionr�r8s     rrp�1SmartClientRequestProtocolTwo.read_response_tupleVs���
�-�-�)�)�+���*�*�*��M�M�*�*�,��8�8��A�A��-�-�1�1�3��.�C�C�D�I���(�(��0��l�*�#'�D� ���
�
�.�.�0��M�
��
+�#(�D� ��M�M�*�*�,��-�-�f�5�5��+�+�*�1�1�/�B��
r"c�N�URRUR5 g)z`Write any prefixes this protocol requires.

Version two sends the value of REQUEST_VERSION_TWO.
N)r=r�r�r�s rr��5SmartClientRequestProtocolTwo._write_protocol_versionps��
	
�
�
�"�"�4�#6�#6�7r"c#�# �[5nUR(d�URRUR	55nUS:Xa[
R"S5eURU5 [URS5HEnS[R;a*[U[5(a[S[U55 Uv� MG UR(dM�URR5 g7f)z6Read bytes from the body, decoding into a byte stream.r"z,Connection lost while reading streamed body.NrGz               %d byte chunk read)r�r�r=r|r�r	r}r��iterr�rrKr;r<rr\)rrvr��
body_bytess    r�read_streamed_body�0SmartClientRequestProtocolTwo.read_streamed_bodyws����+�,�
��0�0��M�M�,�,�]�-I�-I�-K�L�E���|��,�,�B���
�&�&�u�-�"�=�#@�#@�$�G�
��U�.�.�.�:�j�#�3N�3N��=�s�:��O� � �H� �0�0�0�	
�
�
�&�&�(�s�C"D�&D)r�Nr�)
r#r$r%r&rVr�r�r�r�rpr�r�r(r)r"rr�r�Ms"���
+�O�(�N��48�)r"r�c��[R"U[RUUS9n[U5n[R
"XE5n[
U5$)Nr~)rr�r��ProtocolThreeResponderr�ConventionalRequestHandler�ProtocolThreeDecoder)rxryrzr{�request_handler�	responder�message_handlers       r�build_server_protocol_threer��sM���7�7���)�)�)��	�O�'�z�2�I��8�8��T�O���0�0r"c�t�\rSrSr\r\rSSjrSr	Sr
SrSrSr
SrS	rS
rSrSrS
rSrSrSrg)r�i�c��[RU5 SUlU(a)URUl[[5S-UlOURUlSUlSUl	U=Ul
Ulg)NFr�)r�r ru�(_state_accept_expecting_protocol_versionr�r\�MESSAGE_VERSION_THREEr��_state_accept_expecting_headers�decoding_failedr�r�)rr��expect_version_markers   rr �ProtocolThreeDecoder.__init__�sl���!�!�$�'�$��� � $� M� M�D��),�,A�(B�Q�(F�D�%� $� D� D�D��()�D�%�$���6E�E���t�3r"c��SUl[RX5 g![a e[asn[UR[R5(d
[5 URRUR5 URS5 SnAgSnAf[aVnSUl
[U[R5(aO
[5 URRU5 SnAgSnAff=f)Nr"T)r�r�r�r�rr;rr	r�rr�r�r�r�r�)rr�r�s   rr��!ProtocolThreeDecoder.accept_bytes�s���$(��!�	;��)�)�$�6�� �	��'�
	#��i�1�1�6�3L�3L�M�M�%�'�� � �/�/�	�0C�0C�D�
���c�"�"���	;�$(�D� ��)�V�%K�%K�L�L��%�'�� � �/�/�	�:�:��	;�s"��D�A)B!�!
D�.AC?�?Dc��URS:a[S5e[R"SUR	S55unSU-nURU:a[U5eUR5nUSUnUR
X2S5 U$)Nr��!L)r�r��struct�unpackr�r�r�)rrg�end_of_bytesr�r�s     r�_extract_length_prefixed_bytes�3ProtocolThreeDecoder._extract_length_prefixed_bytes�s�������"�!��#�#��M�M�$��(:�(:�1�(=�>�	���6�z������-�!��.�.��$�$�&���q��&�����F�=�1�2��r"c��UR5n[U5nU$![a+n[R"SRU55UeSnAff=f)NzBytes {!r} not bencoded)r�rr�r	r6r7)r�prefixed_bytes�decodedr�s    r�_extract_prefixed_bencoded_data�4ProtocolThreeDecoder._extract_prefixed_bencoded_data�s\���<�<�>��	�&�~�6�G�
���	�	��+�+�)�0�0��@���
��	�s��
A�&A�Ac��URS:Xa[S5eUR5nUSSnURUSS5 U$r�)r�r�r�r�)rr��one_bytes   r�_extract_single_byte�)ProtocolThreeDecoder._extract_single_byte�sM�����!�#� ��#�#��$�$�&���!�A�;�����F�1�2�J�'��r"c��[[5UR-
nUR5nUS:�aH[R	U5(d[
R"U5e[[[55eUR	[5(d[
R"U5eURU[[5S5 URUl
gr�)r\r�r�r�r.r	r�r�r�r�r�)r�needed_bytesr�s   rr��=ProtocolThreeDecoder._state_accept_expecting_protocol_version�s����0�1�D�4G�4G�G���$�$�&���!��)�3�3�F�;�;��<�<�V�D�D� ��%:�!;�<�<�� � �!6�7�7��8�8��@�@����F�3�'<�#=�#?�@�A� �@�@��r"c�T�UR5n[U[5(d%[R"SRU55eURUlURRU5 g![a$n[[R"55UeSnAff=f)Nz Header object {!r} is not a dict)r�r;rDr	r6r7�$_state_accept_expecting_message_partr�r��headers_received�
BaseExceptionr�sysr)rr�r�s   rr��4ProtocolThreeDecoder._state_accept_expecting_headerss����6�6�8���'�4�(�(��+�+�2�9�9�'�B��
�!�E�E���	B�� � �1�1�'�:���	B�*�3�<�<�>�:��A��	B�s�A9�9
B'�B"�"B'c�*�UR5nUS:XaURUlgUS:XaURUlgUS:XaURUlgUS:XaUR5 g[R"SRU55e)N�o�s�b�ezBad message kind byte: {!r})	r�� _state_accept_expecting_one_byter��!_state_accept_expecting_structure�_state_accept_expecting_bytes�doner	r6r7)r�message_part_kinds  rr��9ProtocolThreeDecoder._state_accept_expecting_message_parts��� �5�5�7����$� $� E� E�D��
�$�
&� $� F� F�D��
�$�
&� $� B� B�D��
�$�
&��I�I�K��+�+�-�4�4�5F�G��
r"c���UR5nURUlURR	U5 g![
a$n[
[R"55UeSnAff=fr+)	r�r�r�r��byte_part_receivedr�rr�r)r�byter�s   rr��5ProtocolThreeDecoder._state_accept_expecting_one_byte!s]���(�(�*�� �E�E���	B�� � �3�3�D�9���	B�*�3�<�<�>�:��A��	B���?�
A-�	A(�(A-c���UR5nURUlURR	U5 g![
a$n[
[R"55UeSnAff=fr+)	r�r�r�r��bytes_part_receivedr�rr�r)rr�r�s   rr��2ProtocolThreeDecoder._state_accept_expecting_bytes)s_���<�<�>�� �E�E���	B�� � �4�4�^�D���	B�*�3�<�<�>�:��A��	B�r�c���UR5nURUlURR	U5 g![
a$n[
[R"55UeSnAff=fr+)	r�r�r�r��structure_part_receivedr�rr�r)r�	structurer�s   rr��6ProtocolThreeDecoder._state_accept_expecting_structure3s]���8�8�:�	� �E�E���	B�� � �8�8��C���	B�*�3�<�<�>�:��A��	B�r�c�
�UR5UlURS5 URUlUR
R
5 g![a$n[[R"55UeSnAff=fr+)r�rrr�r�r�r��end_receivedr�rr�r)rr�s  rr��ProtocolThreeDecoder.done;sl���.�.�0������D�!� �=�=���	B�� � �-�-�/���	B�*�3�<�<�>�:��A��	B�s�A�
B�A=�=Bc�l�U=RUR5-
slURS5 gr+r1r�s rr��1ProtocolThreeDecoder._state_accept_reading_unusedDr3r"c��URUR:XagUR(agURbURUR-
$[S5e)Nrz'don't know how many bytes are expected!)r�r�r�r�r�r�r�s rr��#ProtocolThreeDecoder.next_read_sizeHsV������ A� A�A��
�
!�
!�
��(�(�4��0�0�4�3F�3F�F�F�$�%N�O�Or")rur�r�r�r�r�rrNr�)r#r$r%r&�RESPONSE_VERSION_THREEr��REQUEST_VERSION_THREEr�r r�r�r�r�r�r�r�r�r�r�r�r�r�r(r)r"rr�r��s[��,�O�*�N�
F�;�B�"��A�*
B�
�B�B�B�B�"�
Pr"r�c�n�\rSrSr\=rrSrSrSr	Sr
SrSrSr
S	rS
rSrSrS
rSrSrSrg)�_ProtocolThreeEncoderiXic�,�/UlSUlXlgr���_buf�_buf_len�_real_write_func�rrys  rr �_ProtocolThreeEncoder.__init__\s����	���
� *�r"c���URRU5 U=R[U5-
slURUR:�aUR5 ggr+)r�rbr�r\�BUFFER_SIZE�flush�rr�s  rrw�!_ProtocolThreeEncoder._write_funcasH��	
�	�	������
�
��U��#�
��=�=�4�+�+�+��J�J�L�,r"c��UR(aAURSRUR55 URSS2	SUlgg)Nr"r)r�r�rr�r�s rr��_ProtocolThreeEncoder.flushls;���9�9��!�!�#�(�(�4�9�9�"5�6��	�	�!���D�M�r"c�h�/nUHup4URSX44-5 M SRU5$r`rarcs     rrh�(_ProtocolThreeEncoder._serialise_offsetsrrjr"c�.�UR[5 gr+)rwr�r�s rr��-_ProtocolThreeEncoder._write_protocol_versionys�����.�/r"c��[U5nUR[R"S[	U555 URU5 g)Nr�)rrwr��packr\)rr�r�s   r�_write_prefixed_bencode�-_ProtocolThreeEncoder._write_prefixed_bencode|s7���	�"��������T�3�u�:�6�7�����r"c�&�URU5 gr+)r�rSs  r�_write_headers�$_ProtocolThreeEncoder._write_headers�s���$�$�W�-r"c���URS5 /nUHKn[U[5(a"URUR	S55 M:URU5 MM URU5 g)Nr��utf8)rwr;r<rbr�r�)rr>�	utf8_argsr?s    r�_write_structure�&_ProtocolThreeEncoder._write_structure�sa��������	��C��#�s�#�#�� � ����F�!3�4�� � ��%�	�
	
�$�$�Y�/r"c�F�URS5 UR5 g)Nr�)rwr�r�s r�
_write_end� _ProtocolThreeEncoder._write_end�s��������
�
�r"c��URS5 UR[R"S[U555 URU5 g)Nr�r�)rwr�r�r\r�s  r�_write_prefixed_body�*_ProtocolThreeEncoder._write_prefixed_body�s;�������������T�3�u�:�6�7�����r"c�&�URS5 g)NsoC�rwr�s r�_write_chunked_body_start�/_ProtocolThreeEncoder._write_chunked_body_start��������r"c�&�URS5 g)NsoErr�s r�_write_error_status�)_ProtocolThreeEncoder._write_error_status�rr"c�&�URS5 g)NsoSrr�s r�_write_success_status�+_ProtocolThreeEncoder._write_success_status�rr"r�N)r#r$r%r&r�r�r�r�r rwr�rhr�r�rrr
r
rrrr(r)r"rr�r�XsR��'<�<�O�n��K�+�
	���0� �
.�0�� �
 � � r"r�c�0�\rSrSrSrSSjrSrSrSrg)	r�i�c���[RX5 SUlS[RRS50UlS[R;a"[R"5UlSUlgg)NFsSoftware versionr�rG)
r�r �
response_sent�breezy�__version__r�rArrK�_thread�	get_ident�
_thread_id�_response_start_timer�s  rr �ProtocolThreeResponder.__init__�s`���&�&�t�8�"���,�f�.@�.@�.G�.G��.P�Q��
��U�&�&�&�%�/�/�1�D�O�(,�D�%�'r"Nc�H�URc[R"5UlU(a&S[R"5UR-
-nOSnUcSnO.S[USS5-n[	U5S:�aUSSUS-S-n[S	XRXRU5 g)
Nz%5.3fs r� �(�!�r3z...z%12s: [%s] %s%s%s)r"r
rOrLr\rr!)r�actionr�extra_bytes�include_time�t�extras       r�_trace�ProtocolThreeResponder._trace�s����$�$�,�(/�(<�(<�(>�D�%���W�1�1�3�d�6O�6O�O�P�A��A����E��$�{�3�B�/�0�0�E��5�z�B���c�r�
�U�2�Y�.��6���"�F�O�O�Q��Or"c�Z�UR(a[SRU55e[U[R
5(a4[R"SUR45nURU5 gS[R;aURS[U55 SUlUR5 URUR 5 UR#5 UR%S[U5R'SS545 UR)5 g)	Nz1send_error({}) called, but response already sent.s
UnknownMethodrGr�Tr�r��replace)rr�r7r;r	r�rr�r��
send_responserrKr.r<r�rrArrr�r
)rr�r�s   r�
send_error�!ProtocolThreeResponder.send_error�s������ �C�J�J�9�U��
��i��!:�!:�;�;��7�7�!�9�>�>�2��G�
���w�'���U�&�&�&��K�K���Y��0�!����$�$�&����D�M�M�*�� � �"����x��Y��)>�)>�w�	�)R�S�T����r"c���UR(a[SRU55eSUlUR5 UR	UR
5 UR
5(aUR5 OUR5 S[R;a%URS[UR55 URUR5 URbcUR!UR5 S[R;a2URS[#UR5S3URSS9 GOVUR$GbHS=p#Sn['UR$5H�upVUS	-
nUb<UR5 [(R*"US	5nURU5  O�[-U[(R.5(a-UR5 URUR5  OlU[#U5-
nUcUnUR!U5 UR15 S
[R;dM�URS[#U5S3USS9 M� S[R;aURS
USUS3U5 UR35 S[R;aURSSSS9 gg)Nz6send_response({!r}) called, but response already sent.TrGr�rLz bytes)r+rr
rZz
body chunk)�
suppress_timezbody streamz bytes z chunkszresponse endr)rr�r7r�rrAr�rrrrKr.rLr>rrLr
r\r��_iter_with_errorsr�_translate_errorr;r�r�r
)rr�r��	num_bytes�first_chunkrr��error_structs        rr2�$ProtocolThreeResponder.send_response�s~����� �H�O�O����
�
"����$�$�&����D�M�M�*��!�!�#�#��&�&�(��$�$�&��U�&�&�&��K�K�
�D����$7�8����h�m�m�,��=�=�$��%�%�h�m�m�4���*�*�*������8�=�=�)�*�&�1��M�M�!%�	����
!�
!�
-� !�!�E��K�#4�X�5I�5I�#J�����
���'��,�,�.�#*�#;�#;�H�Q�K�#H�L��)�)�,�7��!�%��)J�)J�K�K��0�0�2��-�-�e�j�j�9����U��+�I�"�*�&+���-�-�e�4��J�J�L�#�u�'8�'8�8����(�"�5�z�l�&�1�!�*.�	$��)$K�4��*�*�*����!� �k����w�7���
	
�����U�&�&�&��K�K����K�>�'r")rAr"r!rr�)	r#r$r%r&r r.r3r2r(r)r"rr�r��s��-�
P��(??r"r�c#�# �[U5nS[U54v� M![a g[[4a e[
a1 [
S5 [5 [R"5S4v� gf=f7f)a0Handle errors from iterable.next().

Use like::

    for exc_info, value in _iter_with_errors(iterable):
        ...

This is a safer alternative to::

    try:
        for value in iterable:
           ...
    except:
        ...

Because the latter will catch errors from the for-loop body, not just
iterable.next()

If an error occurs, exc_info will be a exc_info tuple, and the generator
will terminate.  Otherwise exc_info will be None, and value will be the
value from iterable.next().  Note that KeyboardInterrupt and SystemExit
will not be itercepted.
Nz_iter_with_errors caught error)
r��next�
StopIterationr��
SystemExitr�rrr�r)�iterable�iterators  rr7r7sz���0�H�~�H�
�
	���X��&�&����	��!�:�.�	���	��3�4�!�#��,�,�.�$�&�&��		�s0�
A:�!�A:�
A7�A:�AA7�4A:�6A7�7A:c�8�\rSrSrSrSrSrSrSrSr	Sr
g	)
�ProtocolThreeRequesteri6c�j�[RXR5 Xl0UlSUlgr+)r�r r��_medium_requestrA�body_stream_started)r�medium_requests  rr �ProtocolThreeRequester.__init__7s+���&�&�t�-H�-H�I�-����
�#'�� r"c�.�UR5Ulgr+)�copyrArSs  rrR�"ProtocolThreeRequester.set_headers=s�������
r"c��S[R;ab[S[U5SS5 [	UR
RSS5nUb[SU5 [R"5Ul	UR5 URUR5 URU5 UR5 UR
R5 g)NrGrHr
r3rIrJ)rrKrrLrMrFrNr
rOr?r�rrArr
rQ)rr>rIs   rrF�ProtocolThreeRequester.call@s����U�&�&�&��$�d�4�j��2�&6�7��4�/�/�7�7���F�D����-�t�4�'.�';�';�'=�D�$��$�$�&����D�M�M�*����d�#��������-�-�/r"c��S[R;a{[S[U5SSUSS5 [	UR
RSS5nUb[SU5 [S	[U55 [R"5Ul
UR5 URUR5 URU5 URU5 UR!5 UR
R#5 g)
rTrGrUr
r3NrVrWrXrY)rrKrrLrMrFrNr\r
rOr?r�rrArr
r
rQ)rr>rL�paths    rrJ�+ProtocolThreeRequester.call_with_body_bytesMs���
�U�&�&�&��1�4��:�a��3C�T�#�2�Y�O��4�/�/�7�7��$�G�D����2�D�9��+�S��Y�7�'.�';�';�'=�D�$��$�$�&����D�M�M�*����d�#��!�!�$�'��������-�-�/r"c�R�S[R;ab[S[U5SS5 [	UR
RSS5nUb[SU5 [R"5Ul	UR5 URUR5 URU5 URU5nS[R;a[S[U55 UR!U5 UR#5 UR
R%5 g)	r]rGr^r
r3rWNrXr_)rrKrrLrMrFrNr
rOr?r�rrArrhr\r
r
rQ)rr>rLrPr`s     rrO�1ProtocolThreeRequester.call_with_body_readv_array`s����U�&�&�&��*�D��J�q��,<�=��4�/�/�7�7��$�G�D����2�D�9�'.�';�';�'=�D�$��$�$�&����D�M�M�*����d�#��-�-�d�3���U�&�&�&��<�c�+�>N�O��!�!�+�.��������-�-�/r"c��S[R;aV[SU5 [URR
SS5nUb[SU5 [R"5UlSUl	UR5 URUR5 URU5 UR5 SUl	[U5H|upEUbSUR!5 URS5 UR#5 URR%5 UupgnUeUR'U5 UR5 M~ UR#5 URR%5 g!Af=f)NrGzhpss call w/body stream: %rrWrXFT)r�)rrKrrMrFrNr
rOr?rGr�rrArr�r7rr
rQr
)	rr>r�rPr�partr�exc_valrs	         rrc�,ProtocolThreeRequester.call_with_body_streamvs?���U�&�&�&��0�$�7��4�/�/�7�7��$�G�D����2�D�9�'.�';�';�'=�D�$�#(�� ��$�$�&����D�M�M�*����d�#�	
�
�
��#'�� �/��7�N�H��#��(�(�*��%�%�k�2����!��$�$�5�5�7�.6�+��F�!�!�M��)�)�$�/��
�
��!8�"	
�������-�-�/��!�s�)E;�;E>)rArFr?rGN)r#r$r%r&r rRrFrJrOrcr(r)r"rrDrD6s ��(�'�0�0�&0�,$0r"rDr+)3rVrr�r��collectionsr�ior�fastbencoderrrrrr	r
�tracerrrrr�r�r�r�r��InternalBzrErrorrr0r-r@rBrXrlr�r�r�r�r�r�r�r��ResponseHandlerr;r�r�r�r�r�r7rDr)r"r�<module>r^s`��"��
�
���1�
�&�&�2��
)��*��4��1F�F��.�9�v�6�6�9�#�
/�&�4�4�D��"@7�$5�@7�F'A�$A�'A�T��"�Y��^0�^0�Bp"�)�p"�fI� 0�I�XT��y�'�"9�"9�T�n;)�$A�;)�~@D�1�|P�+�|P�~F �F �Rk?�2�k?�\$�Nd0�2�I�d0r"

Youez - 2016 - github.com/yon3zu
LinuXploit