[mod_python] segmentation fault

Julio Mendoza jm at eemsystems.cjb.net
Fri Jun 6 12:02:44 EST 2003

the problem is here:***

what is wrong in this code. this is for reading a cookie from brower.


def verificaraut(req, ID):
	import re
	galleta=getCookie(req.headers_in, ID) ******************
	if galleta==None:
	     return '0',''
	if lista[0]=='0':
		return '0',lista
	if lista[3]<>req.connection.remote_ip:
		return '0',lista
	return lista[0], lista

def getCookie(headers_in, key):
    if headers_in.has_key('Cookie'):
        import Cookie
        C = Cookie.SmartCookie(headers_in['Cookie'])
        if C.has_key(key):
            return C[key].value
    return None

El vie, 06-06-2003 a las 09:35, Jonathan Gardner escribió:
> Hash: SHA1
> On Thursday 05 June 2003 16:37, Julio Mendoza wrote:
> > I'm using postgresql 7.3 and python from debian unstable.
> >
> > After varios upgrades my scripts are working bad.
> >
> > I can not find what happens.
> >
> Segfaults are always troublesome.
> What I used to do in mod_perl was isolate the page or behavior that was giving 
> the seg fault. Then I would try and see which version (you're using a version 
> control system, right?) introduced the problem. If it wasn't obvious by then, 
> I would put various log messages throughout the suspected handler.
> Usually that would lead me to one line of code that was giving the problem. At 
> least then I can post to the mailing list about what was causing the problem.
> I think the same kind of strategy would work for mod_python as well.
> Good luck, you have a fun journey ahead of you!
> - -- 
> Jonathan Gardner <jgardner at jonathangardner.net>
> (was jgardn at alumni.washington.edu)
> Live Free, Use Linux!
> Version: GnuPG v1.2.1 (GNU/Linux)
> iD8DBQE+4Ka3WgwF3QvpWNwRAhfgAJ0UlgoXrHlo5PcmIxE5luq1bYrqhgCgkulG
> SklnZ2tHiMWzTjyEd5hZJ/8=
> =Szy2
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
Julio Mendoza <jm at eemsystems.cjb.net>

More information about the Mod_python mailing list