[mod_python] request.read problem

vfranceschetti at virgilio.it vfranceschetti at virgilio.it
Mon Jan 27 15:39:11 EST 2003


This is a repost, i've forgotten the subject!!!

Hi,
i have these line in my module:
     lun = int(req.headers_in["content-length"])
     testo = req.read(lun)
     dummy=string.find(testo,'A')
     f=open("C:/Programmi/Apache Group/Apache2/py/post.txt","w+")
     f.write("Test :"+str(lun)+"> "+str(dummy)+"--------------"+str(len(testo)))
     f.close()

and this is the result:

Test :41009> -1--------------0

variable length is 0 instead of 41009, and the value is null (string.find
always return -1 but the character A is in the Post body.

Some suggestions?

Thanks

Valentino 







More information about the Mod_python mailing list