[mod_python] [Patch] req.write_file for 3.0.x

Damjan gdamjan at mail.net.mk
Tue May 6 11:51:53 EST 2003


> Ugh, pressed the send button before finishing the code snippet:

too fast on the keyboard.

> def handler(req):
>   req.content_type='text/html'
>   req.send_http_header()
>   sent=0
>   while sent>=0:
>     sent = req.write_file("/var/www/html/index.html",0,-1)
                                                     ^^^^^

I guess it should be "sent" there too:

    sent = req.write_file("/var/www/html/index.html", sent, -1)


-- 
Damjan Georgievski
jabberid: damjan at bagra.net.mk


More information about the Mod_python mailing list