Cookie module segmentation fault

Timothy O'Malley timo at alum.mit.edu
Sat Mar 11 00:22:43 EST 2000


hola.

In article <8a91fh$2kg$1 at nnrp1.deja.com>, Dan wrote:
> I recently ran upon a case where the cookie module was seg faulting on
> me.  
[..]
> --------------------------------
> import cookie
> a = 'Searches="jszXm!\\011Search#952590835.437"'
> cookie.Cookie(a)
> --------------------------------

As other posters note, the segmentation fault comes from the cPickle
module.  If you are using literal strings as your cookie values,
Cookie.py (now at version 2.24 or so) includes a way to skip the
cPickle parsing step:

     cookie.SimpleCookie(a)

See the Cookie.py module documentation for more information.



More information about the Python-list mailing list