Hi All,
I have a view:
from zope.publisher.browser import BrowserView
class Receiver(BrowserView):
def __call__(self):
print self.request.bodyStream.read()
return 'done'
...which I'm trying to test with the following script:
import socket
socket.setdefaulttimeout(5)
Chris Withers wrote:
...but the processing seems to hang in bodyStream.read() until the
socket times out on the client side (ie: I get a timeout exception)
at which point the read() returns and shows what I'd expect.
What am I doing wrong?
I should note that I'm using paster serve here, so
Chris Withers wrote:
I should note that I'm using paster serve here, so I wonder if that
has any bearing?
Well no, but the fact that my deploy.ini contained the following:
[app:main]
use = egg:HelloWorld
[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 8080
..was the problem.
Alek Kowalczyk wrote:
I would suggest checking if the Content-Length value has been properly set.
Yep, httplib.HTTPConnection does this for you. I even checked that it
works ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope Python Consulting
-