Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
SmartCookie Class Reference
Inheritance diagram for SmartCookie:

Public Member Functions

def value_decode
 
def value_encode
 

Detailed Description

SmartCookie
SmartCookie supports arbitrary objects as cookie values.  If the
object is a string, then it is quoted.  If the object is not a
string, however, then SmartCookie will use cPickle to serialize
the object into a string representation.

Note: Large cookie values add overhead because they must be
retransmitted on every HTTP transaction.

Note: HTTP has a 2k limit on the size of a cookie.  This class
does not check for this limit, so be careful!!!

Definition at line 696 of file Cookie.py.

Member Function Documentation

def value_decode (   self,
  val 
)

Definition at line 709 of file Cookie.py.

References pickle.loads().

710  def value_decode(self, val):
711  strval = _unquote(val)
712  try:
713  return loads(strval), val
714  except:
return strval, val
def value_encode (   self,
  val 
)

Definition at line 715 of file Cookie.py.

References pickle.dumps().

716  def value_encode(self, val):
717  if type(val) == type(""):
718  return val, _quote(val)
719  else:
720  return val, _quote( dumps(val) )
721 # end SmartCookie
722 

The documentation for this class was generated from the following file: