����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
imh-python
/
lib
/
python2.7
/
Filename :
_LWPCookieJar.pyc
back
Copy
� ��Wc�����������@���s����d��Z��d�d�l�Z�d�d�l�Z�d�d�l�m�Z�m�Z�m�Z�m�Z�m�Z�m �Z �m �Z �m�Z�m�Z�d����Z �d�e�f�d�������YZ�d�S(���s���Load / save to libwww-perl (LWP) format files. Actually, the format is slightly extended from that used by LWP's (libwww-perl's) HTTP::Cookies, to avoid losing some RFC 2965 information not recorded by LWP. It uses the version string "2.0", though really there isn't an LWP Cookies 2.0 format. This indicates that there is extra information in here (domain_dot and # port_spec) while still being compatible with libwww-perl, I hope. i����N( ���t���_warn_unhandled_exceptiont ���FileCookieJart ���LoadErrort���Cookiet���MISSING_FILENAME_TEXTt���join_header_wordst���split_header_wordst���iso2timet ���time2isozc���������C���s���|��j��|��j�f�d�|��j�f�d�|��j�f�g�}�|��j�d �k �rU�|�j�d�|��j�f���n��|��j�rn�|�j�d���n��|��j�r��|�j�d���n��|��j �r��|�j�d���n��|��j �r��|�j�d���n��|��j�r��|�j�d�t�t �|��j�����f���n��|��j�r�|�j�d���n��|��j�r"|�j�d �|��j�f���n��|��j�rD|�j�d�|��j�f���n��|��j�j����}�|�j����x.�|�D]&�}�|�j�|�t�|��j�|���f���qdW|�j�d�t�|��j���f���t�|�g���S(���s����Return string representation of Cookie in the LWP cookie file format. Actually, the format is extended a bit -- see module docstring. t���patht���domaint���portt ���path_spect ���port_spect ���domain_dott���securet���expirest���discardt���commentt ���commenturlt���versionN(���R���N(���R ���N(���R���N(���s���secureN(���s���discardN(���t���namet���valueR ���R ���R���t���Nonet���appendt���path_specifiedt���port_specifiedt���domain_initial_dotR���R���R���t���floatR���R���t���comment_urlt���_restt���keyst���sortt���strR���R���(���t���cookiet���hR���t���k(����(����sf���/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/_LWPCookieJar.pyt���lwp_cookie_str���s8����� � � � � � � � � $t���LWPCookieJarc�����������B���s8���e��Z�d��Z�e�e�d���Z�d�e�e�d���Z�d����Z�RS(���s[�� The LWPCookieJar saves a sequence of "Set-Cookie3" lines. "Set-Cookie3" is the format used by the libwww-perl library, not known to be compatible with any browser, but which is easy to read and doesn't lose information about RFC 2965 cookies. Additional methods as_lwp_str(ignore_discard=True, ignore_expired=True) c���������C���s����t��j�����}�g��}�xW�|��D]O�}�|�r5�|�j�r5�q�n��|�rQ�|�j�|���rQ�q�n��|�j�d�t�|�����q�Wd�j�|�d�g���S(���s����Return cookies as a string of "\n"-separated "Set-Cookie3" headers. ignore_discard and ignore_expires: see docstring for FileCookieJar.save s���Set-Cookie3: %ss��� t����(���t���timeR���t ���is_expiredR���R%���t���join(���t���selft���ignore_discardt���ignore_expirest���nowt���rR"���(����(����sf���/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/_LWPCookieJar.pyt ���as_lwp_str>���s���� c���������C���s����|�d��k�r6�|��j�d��k �r'�|��j�}�q6�t�t�����n��t�|�d���}�z*�|�j�d���|�j�|��j�|�|�����Wd��|�j����Xd��S(���Nt���ws���#LWP-Cookies-2.0 (���R���t���filenamet ���ValueErrorR���t���opent���writeR0���t���close(���R+���R2���R,���R-���t���f(����(����sf���/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/_LWPCookieJar.pyt���saveN���s����� c���������C���s��|�j�����}�t�j�|��j�|���s:�d�|�}�t�|�����n��t�j����}�d�}�d�} �d�} �ykxd|�j�����}�|�d�k�rz�Pn��|�j�|���s��q^�n��|�t�|���j����}�xt �|�g���D]}�|�d�\�} �}�i��}�i��}�x�| �D]�}�t �|�|�<q��Wx��|�d�D]��\�}�}�|�d��k �r$|�j����}�n�d��}�|�| �k�sB|�| �k�rK|�}�n��|�| �k�ry|�d��k�rlt �}�n��|�|�|�<q��|�| �k�r�|�|�|�<q��|�|�|�<q��W|�j�}�|�d���}�|�d���}�|�d��k �r�t�|���}�n��|�d��k�r�t �}�n��|�d���}�|�j�d���}�t�|�d���| �|�|�d ���|�d���|�|�|�d���|�d ���|�d���|�d���|�|�|�d ���|�d���|���}�|�r�|�j�r�q��n��|�r�|�j�|���r�q��n��|��j�|���q��Wq^�WWnA�t�k �r����n.�t�k �rt����t�d�|�|�f�����n�Xd��S(���Ns5���%r does not look like a Set-Cookie3 (LWP) format files���Set-Cookie3:R ���R���R���R���R���R���R���R ���R ���R���R���R���R'���i����i���t���.s&���invalid Set-Cookie3 format file %r: %r(���s ���port_specs ���path_specs ���domain_dots���secures���discard(���s���versions���ports���paths���domains���expiress���comments ���commenturl(���t���readlinet���ret���searcht���magic_reR���R(���t ���startswitht���lent���stripR���t���FalseR���t���lowert���Truet���getR���R���R���R)���t ���set_cookiet���IOErrort ���ExceptionR����(���R+���R7���R2���R,���R-���t���magict���msgR.���t���headert ���boolean_attrst���value_attrst���linet���dataR���R���t���standardt���restR$���t���vt���lcR#���R���R���R ���t���domain_specifiedt���c(����(����sf���/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/_LWPCookieJar.pyt���_really_load]���s���������� � N( ���t���__name__t ���__module__t���__doc__RC���R0���R���RA���R8���RU���(����(����(����sf���/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/_LWPCookieJar.pyR&���1���s���(���RX���R(���R;���t ���cookielibR����R���R���R���R���R���R���R���R���R%���R&���(����(����(����sf���/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/_LWPCookieJar.pyt���<module>���s���@