|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/lib/python2.4/site-packages/mx/Misc/ |
Upload File : |
mò
YÄ;c @ s+ d Z d k Z d k l Z l Z l Z d Z d Z d f 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.
N( s DateTimes URLs TextToolss 1.2i t Cookiec B sž t Z d Z e Z d Z d Z d Z e e e e d „ Z e i
e i e i
e i d „ Z e Z d „ Z e Z e i
d „ Z e d „ Z d „ Z d
„ Z RS( s2 Cookie object, cf. Netscape's specification.
t /t i c C sÄ | | _ | | _ | d j oe t | t i ƒ o
| | _ q„ t | t i ƒ o t ƒ | | _ 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 selft valuet expirest Nonet
isinstancet DateTimet DateTimeTypet RelativeDateTimet nowt oneSecondt patht domaint secure( R R R R R R R ( ( t2 /usr/lib/python2.4/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 t urlencodeR R t lR R t appendt strftimeR R t join( R R R
R R R ( ( R t header_content? s )!
c C s d | i ƒ S( Ns Set-Cookie: %s
( R R ( R ( ( R t set_cookie_headerS s c C s d | i | | i ƒ f S( Ns Cookie: %s=%s
( R R R R ( R R ( ( R t
cookie_headerZ s c C sà t i | ƒ } | i d j oI | d j o t i ƒ } n | i | j o t o d GHn d Sqh n t i
| i | i f ƒ d j o t o d GHn d Sn t i | i
| i f ƒ d j o t o d GHn d Sn d 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( t URLt urlR R R t datetimeR R t _debugt TextToolst prefixR t suffixt hostR ( R R R ( ( R t match` s$
" " c C s d | i ƒ S( Ns Set-Cookie: %s( R R ( R ( ( R t __str__| s c C s/ d | i i | i i | i | i t | ƒ f S( Ns <%s.%s "%s = %s" at 0x%x>( R t __class__t
__module__t __name__R R t id( R ( ( R t __repr__€ s ( 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&