High performance Python web-app
François Lepoutrre
francois.lepoutre at seriatim.com
Mon May 13 16:36:27 EDT 2002
Tim Golden wrote in message ...
>fwiw, I've had no problems serving binary results from Xitami / LRWP on
>Win32. Any symptoms in particular?
Thank a lot to both of you for getting in at this stage on the
xitami issue. I should that i am no xitami expert.
Installing the webserver was a pleasant experience.
We would be pleased to use xitami.
Building text/html "on the fly" was no problem.
The code that ran into trouble is the following:
# get a blob from a file
fh = open("test.jpg","rb")
jpeg = fh.read()
fh.close()
# invoke the LRWP agent
callcount = 0
import lrwplib
lrwp = lrwplib.LRWP("lrtest","127.0.0.1",81,'')
lrwp.connect()
while 1:
request = lrwp.acceptRequest()
demo_info = cursor_handle.fetchone()
callcount +=1
# push the blob
request.out.write('Content-type: image/jpeg\r\n\r\n')
request.out.write(jpeg)
request.finish()
if callcount >10:
break
lrwp.close()
cursor_handle.close()
We discovered that binary data got truncated
when passing thru the lrwp interface.
opening "python -u" makes no difference.
Possibly the issue is in the socket connection.
We searched google on the issue:
http://xitami.ec-computers.net/1999/Dec/Msgs/l2w56519.html
http://xitami.ec-computers.net/2001/Apr/Msgs/l2w24011.html
Are we forgetting something?
More information about the Python-list
mailing list