403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/tornado/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/tornado/test/__pycache__/httputil_test.cpython-311.pyc
�

���i�X��"�ddlmZmZmZmZmZmZmZmZm	Z	m
Z
ddlmZm
Z
ddlmZddlZddlZddlZddlZddlZddlZddlZddlmZmZmZdeeeeefeeee
fffd�ZGd�d	ej��Z Gd
�dej��Z!Gd�d
ej��Z"Gd�dej��Z#Gd�dej��Z$Gd�dej��Z%Gd�dej��Z&Gd�dej��Z'dS)�)
�
url_concat�parse_multipart_form_data�HTTPHeaders�format_timestamp�HTTPServerRequest�parse_request_start_line�parse_cookie�	qs_to_qsl�HTTPInputError�HTTPFile)�utf8�
native_str)�gen_logN)�Tuple�Dict�List�returnc�
�iifS)z�Return two empty dicts suitable for use with parse_multipart_form_data.

    mypy insists on type annotations for dict literals, so this lets us avoid
    the verbose types throughout this test.
    �r��</usr/lib/python3/dist-packages/tornado/test/httputil_test.py�form_data_argsrs
���r�6�Mrc�V�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
S)�
TestUrlConcatc�V�tdddg��}|�|d��dS)N�https://localhost/path��yr��zr �https://localhost/path?y=y&z=z�r�assertEqual��self�urls  r�test_url_concat_no_query_paramsz-TestUrlConcat.test_url_concat_no_query_params%s4���1�J�
�3K�L�L������>�?�?�?�?�?rc�V�tdddg��}|�|d��dS)Nr)rz/yrz!https://localhost/path?y=%2Fy&z=zr"r$s  r�test_url_concat_encode_argsz)TestUrlConcat.test_url_concat_encode_args)s4���1�K��3L�M�M������A�B�B�B�B�Brc�V�tdddg��}|�|d��dS)Nzhttps://localhost/path?rrr!r"r$s  r�test_url_concat_trailing_qz(TestUrlConcat.test_url_concat_trailing_q-s4���2�Z��4L�M�M������>�?�?�?�?�?rc�V�tdddg��}|�|d��dS)Nzhttps://localhost/path?xrr�!https://localhost/path?x=&y=y&z=zr"r$s  r�&test_url_concat_q_with_no_trailing_ampz4TestUrlConcat.test_url_concat_q_with_no_trailing_amp1s4���3�j�*�5M�N�N������A�B�B�B�B�Brc�V�tdddg��}|�|d��dS)Nzhttps://localhost/path?x&rrr-r"r$s  r�test_url_concat_trailing_ampz*TestUrlConcat.test_url_concat_trailing_amp5s4���4�z�:�6N�O�O������A�B�B�B�B�Brc�V�tdddg��}|�|d��dS)Nzhttps://localhost/path?a=1&b=2rrz&https://localhost/path?a=1&b=2&y=y&z=zr"r$s  r�test_url_concat_mult_paramsz)TestUrlConcat.test_url_concat_mult_params9s4���9�J�
�;S�T�T������F�G�G�G�G�Grc�R�tdg��}|�|d��dS�Nzhttps://localhost/path?r=1&t=2r"r$s  r�test_url_concat_no_paramsz'TestUrlConcat.test_url_concat_no_params=s/���9�2�>�>������>�?�?�?�?�?rc�R�tdd��}|�|d��dSr4r"r$s  r�test_url_concat_none_paramsz)TestUrlConcat.test_url_concat_none_paramsAs/���9�4�@�@������>�?�?�?�?�?rc�T�tddg��}|�|d��dS)Nzhttps://localhost/path#tabrzhttps://localhost/path?y=y#tabr"r$s  r�test_url_concat_with_fragz'TestUrlConcat.test_url_concat_with_fragEs1���5�
�|�D�D������>�?�?�?�?�?rc�V�tdddg��}|�|d��dS)Nr)r�y1)r�y2z https://localhost/path?y=y1&y=y2r"r$s  r�!test_url_concat_multi_same_paramsz/TestUrlConcat.test_url_concat_multi_same_paramsIs4���1�K��3M�N�N������@�A�A�A�A�Arc�T�tddg��}|�|d��dS)Nzhttps://localhost/path?r=1&r=2rz"https://localhost/path?r=1&r=2&y=yr"r$s  r�'test_url_concat_multi_same_query_paramsz5TestUrlConcat.test_url_concat_multi_same_query_paramsMs1���9�J�<�H�H������B�C�C�C�C�Crc�n�tdtd�����}|�|d��dS)Nrr)rzhttps://localhost/path?y=y)r�dictr#r$s  r�test_url_concat_dict_paramsz)TestUrlConcat.test_url_concat_dict_paramsQs7���1�4�#�;�;�;�?�?������:�;�;�;�;�;rN)�__name__�
__module__�__qualname__r'r)r+r.r0r2r5r7r9r=r?rBrrrrr$s�������@�@�@�C�C�C�@�@�@�C�C�C�C�C�C�H�H�H�@�@�@�@�@�@�@�@�@�B�B�B�D�D�D�<�<�<�<�<rrc��eZdZd�ZdS)�QsParseTestc��d}tj�|��}tt	|����}|�d|��|�d|��|�d|��dS)Nza=1&b=2&a=3)�a�1)rI�3)�b�2)�urllib�parse�parse_qs�listr
�assertIn)r%�qsstring�qs�qsls    r�test_parsingzQsParseTest.test_parsingWsq�� ��
�\�
"�
"�8�
,�
,���9�R�=�=�!�!���
�
�j�#�&�&�&��
�
�j�#�&�&�&��
�
�j�#�&�&�&�&�&rN)rCrDrErVrrrrGrGVs#������'�'�'�'�'rrGc�P�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dS)
�MultipartFormDataTestc��d�dd��}t��\}}td|||��|dd}|�|dd��|�|d	d
��dS)N�T--1234
Content-Disposition: form-data; name="files"; filename="ab.txt"

Foo
--1234--�
�
�1234�filesr�filename�ab.txt�body�Foo��replacerrr#�r%�data�argsr^�files     r�test_file_uploadz&MultipartFormDataTest.test_file_uploadas����

�G��7�
�
�	
�%�&�&���e�!�'�4��u�=�=�=��W�~�a� ������j�)�8�4�4�4�����f��v�.�.�.�.�.rc��d�dd��}t��\}}td|||��|dd}|�|dd��|�|d	d
��dS)NsP--1234
Content-Disposition: form-data; name=files; filename=ab.txt

Foo
--1234--r[r\r]r^rr_r`rarbrcres     r�test_unquoted_namesz)MultipartFormDataTest.test_unquoted_namesps����

�G��7�
�
�	
�%�&�&���e�!�'�4��u�=�=�=��W�~�a� ������j�)�8�4�4�4�����f��v�.�.�.�.�.rc��gd�}|D]�}tjd|��d|�dd���dd��z}t|�dd	����}t	��\}}td
|||��|dd}|�|d
|��|�|dd����dS)N)za;b.txtza"b.txtza";b.txtza;"b.txtz	a";";.txtza\"b.txtza\b.txtztrying filename %rzP--1234
Content-Disposition: form-data; name="files"; filename="%s"

Foo
--1234--�\�\\�"z\"�
�
r]r^rr_rarb)�logging�debugrdr
rrr#)r%�	filenamesr_�str_datarfrgr^rhs        r�test_special_filenamesz,MultipartFormDataTest.test_special_filenames�s��
�
�
�	�"�	3�	3�H��M�.��9�9�9��
����f����g��U���	�H���(�(��v�6�6�7�7�D�(�*�*�K�D�%�%�g�t�T�5�A�A�A���>�!�$�D����T�*�-�x�8�8�8����T�&�\�6�2�2�2�2�#	3�	3rc��d�dd��}t��\}}td|||��|dd}|�|dd��|�|d	d
��dS)Nsr--1234
Content-Disposition: form-data; name="files"; filename="ab.txt"; filename*=UTF-8''%C3%A1b.txt

Foo
--1234--r[r\r]r^rr_uáb.txtrarbrcres     r�test_non_ascii_filenamez-MultipartFormDataTest.test_non_ascii_filename�s����

�G��7�
�
�	
�%�&�&���e�!�'�4��u�=�=�=��W�~�a� ������j�)�:�6�6�6�����f��v�.�.�.�.�.rc��d�dd��}t��\}}td|||��|dd}|�|dd��|�|d	d
��dS)NrZr[r\s"1234"r^rr_r`rarbrcres     r�)test_boundary_starts_and_ends_with_quotesz?MultipartFormDataTest.test_boundary_starts_and_ends_with_quotes�s����

�G��7�
�
�	
�%�&�&���e�!�)�T�4��?�?�?��W�~�a� ������j�)�8�4�4�4�����f��v�.�.�.�.�.rc��d�dd��}t��\}}|�td���5t	d|||��ddd��n#1swxYwY|�|i��dS)Ns--1234

Foo
--1234--r[r\z#multipart/form-data missing headers��msgr]�rdr�assertRaisesrrr#�r%rfrgr^s    r�test_missing_headersz*MultipartFormDataTest.test_missing_headers�s����
�G��7�
�
�		
�%�&�&���e�
�
�
�� E��
�
�	B�	B�
&�g�t�T�5�A�A�A�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B����	B�	B�	B�	B�	
�����#�#�#�#�#��A#�#A'�*A'c��d�dd��}t��\}}|�td���5t	d|||��ddd��n#1swxYwY|�|i��dS)NsR--1234
Content-Disposition: invalid; name="files"; filename="ab.txt"

Foo
--1234--r[r\�Invalid multipart/form-datar|r]r~r�s    r� test_invalid_content_dispositionz6MultipartFormDataTest.test_invalid_content_disposition�s����

�G��7�
�
�	
�%�&�&���e�
�
�
�~�3P�
�
Q�
Q�	B�	B�%�g�t�T�5�A�A�A�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B����	B�	B�	B�	B������#�#�#�#�#r�c��d�dd��}t��\}}|�td���5t	d|||��ddd��n#1swxYwY|�|i��dS)NsS--1234
Content-Disposition: form-data; name="files"; filename="ab.txt"

Foo--1234--r[r\r�r|r]r~r�s    r�.test_line_does_not_end_with_correct_line_breakzDMultipartFormDataTest.test_line_does_not_end_with_correct_line_break�s�����w��7�
�
�		
�%�&�&���e�
�
�
�~�3P�
�
Q�
Q�	B�	B�%�g�t�T�5�A�A�A�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B����	B�	B�	B�	B������#�#�#�#�#r�c��d�dd��}t��\}}|�td���5t	d|||��ddd��n#1swxYwY|�|i��dS)NsF--1234
Content-Disposition: form-data; filename="ab.txt"

Foo
--1234--r[r\z&multipart/form-data value missing namer|r]r~r�s    r�6test_content_disposition_header_without_name_parameterzLMultipartFormDataTest.test_content_disposition_header_without_name_parameter�s����

�G��7�
�
�	
�%�&�&���e�
�
�
�� H��
�
�	B�	B�
&�g�t�T�5�A�A�A�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B����	B�	B�	B�	B�	
�����#�#�#�#�#r�c��d�dd��}t��\}}td|||��|dd}|�|dd��|�|d	d
��dS)NsU--1234
Content-Disposition: form-data; name="files"; filename="ab.txt"

Foo
--1234--
r[r\r]r^rr_r`rarbrcres     r�test_data_after_final_boundaryz4MultipartFormDataTest.test_data_after_final_boundary�s�����G��7�
�
�
	
�%�&�&���e�!�'�4��u�=�=�=��W�~�a� ������j�)�8�4�4�4�����f��v�.�.�.�.�.rc��d�}|d��}|d��}||zdkr|�d|�d|����dSdS)Nc��tj��}dd|zzdzdz}i}i}td|||��tj��|z
S)Ns+--1234
Content-Disposition: form-data; x="�;s"; s1name="files"; filename="a.txt"

Foo
--1234--
r])�timer)�n�start�messagergr^s     r�fzJMultipartFormDataTest.test_disposition_param_linear_performance.<locals>.fsj���I�K�K�E����(����O�	O�
�,.�D�/1�E�%�g�w��e�D�D�D��9�;�;��&�&ri��'�z,Disposition param parsing is not linear: d1=� vs d2=��fail�r%r��d1�d2s    r�)test_disposition_param_linear_performancez?MultipartFormDataTest.test_disposition_param_linear_performancesj��	'�	'�	'��Q�u�X�X��
�Q�v�Y�Y��
��7�R�<�<��I�I�P�"�P�P�2�P�P�Q�Q�Q�Q�Q��<rN)rCrDrErirkrvrxrzr�r�r�r�r�r�rrrrXrX`s�������
/�
/�
/�/�/�/� 3�3�3�:
/�
/�
/�
/�
/�
/�
$�
$�
$�$�$�$�$�$�$�$�$�$� /�/�/�&R�R�R�R�RrrXc�D�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
S)�HTTPHeadersTestc�X�d�dd��}tj|��}|�|dd��|�|�d��dg��|�|dd��|�|�d��d	d
g��|�tt
|�������gd���|�d|v��|�d|v��dS)
Nz>Foo: bar
 baz
Asdf: qwer
	zxcv
Foo: even
     more
     lines
rprq�asdf�	qwer zxcv�Foozbar baz,even more lines�foo�bar baz�even more lines))�Asdfr�)r�r�)r�r�r�)	rdrrOr#�get_list�sortedrQ�get_all�
assertTrue)r%rf�headerss   r�test_multi_linezHTTPHeadersTest.test_multi_line!s-��
��G��&�
�
�	
��#�D�)�)��������+�6�6�6�����)�)�&�1�1�K�=�A�A�A�������)B�C�C�C�����)�)�%�0�0�9�>O�2P�Q�Q�Q�����4����)�)�*�*�+�+�S�S�S�	
�	
�	
�
	
����'�)�*�*�*�����'�)�*�*�*�*�*rc�V�d}|�ttj|��dS)Nz	 Foo: bar)rrrrO)r%rfs  r�test_malformed_continuationz+HTTPHeadersTest.test_malformed_continuation>s*�������.�+�*;�T�B�B�B�B�Brc	���gd�}|D]�}dD]�}		|�|��}n#t$rY�&wxYwd|zdz}tjt	|�d������}ddt	|�d����zdzfg}|�|t|���������#t$rtjd	||���wxYw��dS)
N)�����…u
u
)r
�latin1sCookie: foo=sbarr��Cookiezfoo=�barzfailed while trying %r in %s)�encode�UnicodeEncodeErrorrrOr�decoder#rQr��	Exceptionr�warning)r%�newlines�newline�encoding�encodedrfr��expecteds        r�test_unicode_newlinesz%HTTPHeadersTest.test_unicode_newlinesEsH��
�
�
�� �	�	�G�.�
�
���!�")�.�.��":�":����-�!�!�!� ��!����+�W�4�v�=�D�*�/�
�4�;�;�x�;P�;P�0Q�0Q�R�R�G�%�"�Z����x�0H�0H�%I�%I�I�E�Q�� �H��$�$�X�t�G�O�O�4E�4E�/F�/F�G�G�G�G�� �����O�$B�G�X�V�V�V������%
�	�	s"�%�C�
2�C�2�BC�"C4c��tjd��}|�t|�����gd���dS)Nz&CRLF: crlf
LF: lf
CR: cr
More: more
))�Crz
cr
More: more)�Crlf�crlf)�Lf�lf)rrOr#r�r��r%r�s  r�test_optional_crz HTTPHeadersTest.test_optional_crmsU���#�$R�S�S������7�?�?�$�$�%�%�F�F�F�	
�	
�	
�	
�	
rc	�(�gd�}t��}|D]\}}|�||���|���}tj|��}tj|��}||||fD]D}|�tt
|�������|���E|||fD]T}|�||��|�|�	d��|�	d�����UdS)N))�ArJ)r�rM)�B�cr�)
r�add�copy�deepcopyr#rQr�r��assertIsNotr�)	r%�	all_pairs�h1�k�v�h2�h3�h4r�s	         r�	test_copyzHTTPHeadersTest.test_copyws ��8�8�8�	�
�]�]���	�	�D�A�q��F�F�1�a�L�L�L�L�
�W�W�Y�Y��
�Y�r�]�]��
�]�2�
�
���B��B�'�	I�	I�G�
���T�&����):�):�";�";�<�<�i�H�H�H�H��B��|�	F�	F�G����W�b�)�)�)����W�-�-�c�2�2�B�K�K��4D�4D�E�E�E�E�	F�	Frc�F�t��}|�dd��|�dd��|�dd��tj|��}tj|��}|�t
|�����t
|�������|�t
|�����t
|�������dS)Nz
Set-Cookieza=bzc=dzContent-Typez	text/html)	rr��pickle�dumps�loadsr#r�r��items)r%r��pickled�	unpickleds    r�test_pickle_roundtripz%HTTPHeadersTest.test_pickle_roundtrip�s����-�-�����L�%�(�(�(����L�%�(�(�(����N�K�0�0�0��,�w�'�'���L��)�)�	�������� 1� 1�2�2�F�9�;L�;L�;N�;N�4O�4O�P�P�P������
�
���0�0�&����9J�9J�2K�2K�L�L�L�L�Lrc��t��}d|d<|�|�dd��d��|�|dd��|�|�dd��d��|�|dd��|�t|�����ddg��dS)Nr�r��baz�quux�xyzzy)r�r�)�Quuxr�)rr#�
setdefaultr�r�r�s  r�test_setdefaultzHTTPHeadersTest.test_setdefault�s����-�-����������+�+�E�5�9�9�5�A�A�A��������/�/�/�����+�+�F�G�<�<�g�F�F�F�������'�2�2�2�������� 1� 1�2�2�^�EV�4W�X�X�X�X�Xrc��t��}|�dd��|�dd��|�dd��tjt|����}|�||��dS)Nr�rJrMrK)rr�rO�strr#)r%r��headers2s   r�test_stringzHTTPHeadersTest.test_string�sy���-�-�����E�3�������E�3�������E�3�����$�S��\�\�2�2������(�+�+�+�+�+rc��d�}|d��}|d��}||zdkr|�d|�d|����dSdS)Nc��tj��}t��}t|��D]}|�dd���tj��|z
S)NzX-Foor�)r�r�ranger�)r�r�r��is    rr�z2HTTPHeadersTest.test_linear_performance.<locals>.f�sS���I�K�K�E�!�m�m�G��1�X�X�
,�
,�����G�U�+�+�+�+��9�;�;��&�&rr�順r�z.HTTPHeaders.add() does not scale linearly: d1=r�r�r�s    r�test_linear_performancez'HTTPHeadersTest.test_linear_performance�sj��	'�	'�	'��Q�v�Y�Y��
�Q�w�Z�Z��
��7�R�<�<��I�I�R�B�R�R�R�R�R�S�S�S�S�S��<rN)rCrDrEr�r�r�r�r�r�r�r�r�rrrr�r� s�������+�+�+�:C�C�C�&�&�&�P
�
�
�F�F�F�"M�M�M�	Y�	Y�	Y�,�,�,�
T�
T�
T�
T�
Trr�c�:�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	S)
�FormatTimestampTestg*; R]A�AzSun, 27 Jan 2013 18:43:20 GMTc�V�|�t|��|j��dS�N)r#r�EXPECTED)r%�values  r�checkzFormatTimestampTest.check�s)�����)�%�0�0�$�-�@�@�@�@�@rc�:�|�|j��dSr�)r��	TIMESTAMP�r%s r�test_unix_time_floatz(FormatTimestampTest.test_unix_time_float�s���
�
�4�>�"�"�"�"�"rc�T�|�t|j����dSr�)r��intr�r�s r�test_unix_time_intz&FormatTimestampTest.test_unix_time_int�s$���
�
�3�t�~�&�&�'�'�'�'�'rc�^�|�tj|j����dSr�)r�r��gmtimer�r�s r�test_struct_timez$FormatTimestampTest.test_struct_time�s&���
�
�4�;�t�~�.�.�/�/�/�/�/rc���ttj|j����}|�dt|����|�|��dS)N�	)�tupler�rr�r#�lenr�)r%�tups  r�test_time_tuplez#FormatTimestampTest.test_time_tuple�sJ���D�K���/�/�0�0������C��H�H�%�%�%��
�
�3�����rc�t�|�tj�|j����dSr�)r��datetime�utcfromtimestampr�r�s r�
test_datetimez!FormatTimestampTest.test_datetime�s-���
�
�8�$�5�5�d�n�E�E�F�F�F�F�FrN)rCrDrEr�r�r�r�rrr
rrrrr�r��s�������!�I�.�H�A�A�A�#�#�#�(�(�(�0�0�0����
G�G�G�G�Grr�c� �eZdZd�Zd�Zd�ZdS)�HTTPServerRequestTestc�&�td���dS�N�/)�uri)rr�s r�test_default_constructorz.HTTPServerRequestTest.test_default_constructor�s��	�c�"�"�"�"�"�"rc�f�td���}|�|jt��dSr)r�assertIsInstancera�bytes)r%�requetss  r�test_body_is_a_byte_stringz0HTTPServerRequestTest.test_body_is_a_byte_string�s0��#��,�,�,�����g�l�E�2�2�2�2�2rc��tdtddgi�����}|�dt|��v��dS)Nr�Canaryz	Coal Mine)rr�)rrr��repr)r%�requests  r�"test_repr_does_not_contain_headersz8HTTPServerRequestTest.test_repr_does_not_contain_headers�sO��#��[�(�[�M�)B�C�C�
�
�
��	
�����W�
�
�5�6�6�6�6�6rN)rCrDrErrrrrrrr�sA������#�#�#�3�3�3�7�7�7�7�7rrc� �eZdZdZdZdZd�ZdS)�ParseRequestStartLineTest�GETz/foozHTTP/1.1c�2�d�|j|j|jg��}t	|��}|�|j|j��|�|j|j��|�|j|j��dS)N� )	�join�METHOD�PATH�VERSIONrr#�method�path�version)r%�
start_line�parsed_start_lines   r�test_parse_request_start_linez7ParseRequestStartLineTest.test_parse_request_start_line�s����X�X�t�{�D�I�t�|�D�E�E�
�4�Z�@�@�����*�1�4�;�?�?�?����*�/���;�;�;����*�2�D�L�A�A�A�A�ArN)rCrDrEr&r'r(r.rrrr!r!�s7������
�F��D��G�B�B�B�B�Brr!c�,�eZdZd�Zd�Zd�Zd�Zd�ZdS)�ParseCookieTestc��|�td��ddd���|�td��dddd	d
���|�td��dd
i��|�td��ddi��|�td��ddddd���dS)zO
        Test cases copied from Python's Lib/test/test_http_cookies.py
        zchips=ahoy; vienna=finger�ahoy�finger)�chips�viennaz)keebler="E=mc2; L=\"Loves\"; fudge=\012;"z"E=mc2z	\"Loves\"z\012ro)�keebler�L�fudge�z
keebler=E=mc2r6zE=mc2zkey:term=value:termzkey:termz
value:termza=b; c=[; d=r; f=hrL�[�r�h)rIr��dr�N�r#r	r�s r�test_python_cookiesz#ParseCookieTest.test_python_cookies�s���	
����4�5�5���1�1�	
�	
�	
�	
����G�H�H� �}�w�C�P�P�	
�	
�	
�
	
����o�6�6��G�8L�M�M�M�����.�/�/�*�l�1K�	
�	
�	
�	
����-�.�.�c��#�TW�0X�0X�	
�	
�	
�	
�	
rc��|�td��ddd���|�td��ddd���dS)	Nza=b; Domain=example.comrLzexample.com)rI�Domainz
a=b; h=i; a=cr�r�)rIr<r>r�s r�test_cookie_edgecasesz%ParseCookieTest.test_cookie_edgecasess^������2�3�3�3�-�5X�5X�	
�	
�	
�
	
����o�6�6�c��8L�8L�M�M�M�M�Mrc��|�dtd�������|�td��dddd���|�td��d	d
d���|�td��d
di��|�td��dt	d��i��|�td��ddd���dS)zs
        Cookie strings that go against RFC6265 but browsers will send if set
        via document.cookie.
        �django_languagez$abc=def; unnamed; django_language=enza=b; "; c=drLror=)rIr9r�za b c=d e = f; gh=izd e = fr�)za b c�ghza   b,c<>@:/[]?{}=d  "  =e,f gza   b,c<>@:/[]?{}zd  "  =e,f gusaint=André Bessette�saintuAndré Bessettez  =  b  ;  ;  =  ;   c  =  ;  r9)r9r�N)rRr	�keysr#rr�s r�test_invalid_cookiesz$ParseCookieTest.test_invalid_cookiess,��	
�
�
���?�@�@�E�E�G�G�	
�	
�	
�
	
����m�4�4�C�S�s�6S�6S�T�T�T�����.�/�/�9�C�1P�1P�	
�	
�	
�	
����9�:�:�
 �.�1�	
�	
�	
�
	
����0�1�1�
�j�!2�3�3�4�	
�	
�	
�	
����9�:�:��2�<N�<N�	
�	
�	
�	
�	
rc���gd�}|D]]\}}|�|��5t|��}|�|d|��ddd��n#1swxYwY�^dS)N))za="b=\""�b=")za="b=\\"�b=\)za="b=\="zb==)za="b=\n"zb=n)z
a="b=\042"rJ)z
a="b=\134"rK)z
a="b=\377"ub=ÿ)z
a="b=\400"zb=400)z	a="b=\42"zb=42)za="b=\\042"zb=\042)za="b=\\134"zb=\134)z
a="b=\\\""�b=\")za="b=\\\042"rL)za="b=\134\""rL)za="b=\134\042"rLrI)�subTestr	r#)r%�casesr��decodedr�s     r�test_unquotezParseCookieTest.test_unquote7s���
�
�
��"!&�	2�	2��G�W����g�&�&�
2�
2� ��)�)��� � ��3���1�1�1�
2�
2�
2�
2�
2�
2�
2�
2�
2�
2�
2����
2�
2�
2�
2��	2�	2s�,A�A	� A	c���d}dD]�}|�|��5tj��}d||zzdz}t|��d}tj��}|�|dd�d��|�|dd�d	��|�t	|��|d
z��|�||z
dd��ddd��n#1swxYwY��dS)
Nr�)rnz\134za="b=rorI�rK���z\\\��zTest took too long)rMr�r	r#r�
assertLess)r%r�r�r�rfr��ends       r�test_unquote_largez"ParseCookieTest.test_unquote_largePsS��
��%�	F�	F�G����g�&�&�

F�

F��	������1��,�s�2��$�T�*�*�3�/���i�k�k��� � ��r��r��F�3�3�3�� � ��r�s�s��X�6�6�6�� � ��U���Q��U�3�3�3�����e��Q�0D�E�E�E�

F�

F�

F�

F�

F�

F�

F�

F�

F�

F�

F����

F�

F�

F�

F��	F�	Fs�CC+�+C/	�2C/	N)rCrDrEr?rBrHrPrXrrrr0r0�sh������
�
�
�2N�N�N� 
� 
� 
�D2�2�2�2F�F�F�F�Frr0)(�tornado.httputilrrrrrrr	r
rr�tornado.escaper
r�tornado.logrr�rrrr�r��urllib.parserN�unittest�typingrrrr�rr�TestCaserrGrXr�r�rr!r0rrr�<module>r`s��������������������������,�+�+�+�+�+�+�+�������������������
�
�
�
�������������$�$�$�$�$�$�$�$�$�$���d�3��U��#3�4�d�3��X��;N�6O�O�P�����/<�/<�/<�/<�/<�H�%�/<�/<�/<�d'�'�'�'�'�(�#�'�'�'�}R�}R�}R�}R�}R�H�-�}R�}R�}R�@RT�RT�RT�RT�RT�h�'�RT�RT�RT�jG�G�G�G�G�(�+�G�G�G�87�7�7�7�7�H�-�7�7�7�$
B�
B�
B�
B�
B�� 1�
B�
B�
B�sF�sF�sF�sF�sF�h�'�sF�sF�sF�sF�sFr

Youez - 2016 - github.com/yon3zu
LinuXploit