/usr/lib64/python2.6/site-packages/mx/Misc
Edit: /usr/lib64/python2.6/site-packages/mx/Misc/Cookie.pyc (5707B)
Ñò
Ò9?c @ s1 d Z d d k Z d d k l Z l Z l Z d Z d Z d d d „ ƒ YZ e i e i
e i e i e i
e i d „ Z e Z e d j o e d
d d d
d d d d ƒZ e GHe i ƒ Z e e ƒ Z e GHe e d ƒ Z e GHHe d
d d d ƒZ e i ƒ GHe i ƒ Z e e ƒ Z e i ƒ GHn d S( s Cookie -- Create sendable Netscape Cookies.
Needs mxDateTime, mxURL and mxTextTools.
Copyright (c) 2000, Marc-Andre Lemburg; All Rights Reserved.
See the documentation for further information on copyrights,
or contact the author. All Rights Reserved.
iÿÿÿÿN( t DateTimet URLt TextToolss 1.2i t Cookiec B sž e Z d Z d Z d Z d Z d Z d d d d d „ Z e i
e i e i
e i d „ Z e Z d „ Z e Z e i
d „ Z d d „ Z d „ Z d
„ Z RS( s2 Cookie object, cf. Netscape's specification.
t /t i c C sÍ | | _ | | _ | d j on t | t i ƒ o | i ƒ | _ q t | t i ƒ o t i ƒ | | _ q t i ƒ | t i | _ n | o
| | _
n | o
| | _ n | o
d | _ n d S( s Create a Netscape cookie for name with the given value.
If expires is given, the cookie will be a temporary cookie
which expires after a certain amount of time. expires may
be given as integer (seconds relative to the current
time), DateTime instance (absolute date/time) or
RelativeDateTime instance (relative date/time to current
time).
path, domain, secure work according to the Netscape
specification.
i N(
t namet valuet Nonet
isinstanceR t DateTimeTypet gmtimet expirest RelativeDateTimet oneSecondt patht domaint secure( t selfR R R R R R ( ( s4 /usr/lib64/python2.6/site-packages/mx/Misc/Cookie.pyt __init__ s
c C s¤ d | i | | i ƒ f d | i g } | i d j o! | i d | i i d ƒ ƒ n | i o | i d | i ƒ n | i o | i d ƒ n | | d ƒ S( Ns %s=%ss path=%ss
expires=%ss %a, %d %b %Y %H:%M:%S GMTs domain=%sR t ;( R R R R R t appendt strftimeR R ( R t nowR t urlencodet joint l( ( s4 /usr/lib64/python2.6/site-packages/mx/Misc/Cookie.pyt header_content? s
c C s d | i ƒ S( Ns Set-Cookie: %s
( R ( R ( ( s4 /usr/lib64/python2.6/site-packages/mx/Misc/Cookie.pyt set_cookie_headerS s c C s d | i | | i ƒ f S( Ns Cookie: %s=%s
( R R ( R R ( ( s4 /usr/lib64/python2.6/site-packages/mx/Misc/Cookie.pyt
cookie_headerZ s c C s× t i | ƒ } | i d j oF | d j o t i ƒ } n | i | j o t o d GHn d Sn t i | i | i f ƒ d j o t o d GHn d St i | i
| i f ƒ d j o t o d GHn d Sd S( sú Return 1/0 depending on whether the Cookie matches
the given url or not.
datetime is used to check for expiration in case the
Cookie is a temporary one. It defaults to the current
date/time.
t expiredi s path does not matchs domain does not matchi N( R R R R R t _debugR t prefixR t suffixt hostR ( R t urlt datetime( ( s4 /usr/lib64/python2.6/site-packages/mx/Misc/Cookie.pyt match` s"
" " c C s d | i ƒ S( Ns Set-Cookie: %s( R ( R ( ( s4 /usr/lib64/python2.6/site-packages/mx/Misc/Cookie.pyt __str__| s c C s/ d | i i | i i | i | i t | ƒ f S( Ns <%s.%s "%s = %s" at 0x%x>( t __class__t
__module__t __name__R R t id( R ( ( s4 /usr/lib64/python2.6/site-packages/mx/Misc/Cookie.pyt __repr__€ s N( R) R( t __doc__R R R R R R R R R R R t stringR R t contentR t http_headerR R% R&