[mod_python] httplib: [notice] child pid 8937 exit signal Segmentation fault (11)

Gregory Trubetskoy grisha at modpython.org
Tue Jul 4 12:11:22 EST 2000


Ilpo -

The code below worked for me without a hinch. This is on FreeBSD 4.0
Stable, Apache 1.3.12.

Anyone else on this list experiences this problem?

Grisha

On 4 Jul 2000, Ilpo Nyyssönen wrote:

> 
> I tried to use urllib to retrieve some pictures dynamically, but the
> child dies with segmentation fault. This happens also with httplib,
> for example with the code below. The dying seems to happen when
> closing the connection.
> 
> -- clip --
> from mod_python import apache
> import httplib
> 
> def handler(req):
>     req.content_type = 'text/plain'
>     req.send_http_header()
>     
>     h = httplib.HTTP('www.python.org')
>     h.putrequest('GET', '/index.html')
>     h.putheader('Accept', 'text/html')
>     h.putheader('Accept', 'text/plain')
>     h.endheaders()
>     errcode, errmsg, headers = h.getreply()
>     if errcode == 200:
>         f = h.getfile()
>         req.write(f.read())
> 
>     return apache.OK
> -- clip --
> 
> -- 
> Ilpo Nyyssönen # biny
> /* :-) */
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 




More information about the Mod_python mailing list