[Zope3-Users] getting post data in a Zope 3 view

2008-08-19 Thread Chris Withers
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)

Re: [Zope3-Users] getting post data in a Zope 3 view [moreinfo: paster]

2008-08-19 Thread Chris Withers
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

Re: [Zope3-Users] getting post data in a Zope 3 view - paste.httpserver is the problem

2008-08-19 Thread Chris Withers
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.

Re: [Zope3-Users] getting post data in a Zope 3 view [moreinfo: paster]

2008-08-19 Thread Chris Withers
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 -