mod_python request.read problem
Valentino Franceschetti
vfranceschetti at virgilio.it
Thu Jan 23 09:52:05 EST 2003
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 Python-list
mailing list