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
-
Hi All,
Am I right in thinking that this is now the canonical way to get a zope
3 instance:
http://pypi.python.org/pypi/zc.zope3recipes
?
If so, could the owners of these packages hide, remove or otherwise
document that they're out of date:
I use a session-based wizard with plone.z3cform that uses the concept
from z3c.formdemo's wizard. The content is kept inside a session until
it is written into the db in .finish().
I have problems with Lists and Choices where the vocabulary needs a
suitable context that the content from the
Chris Withers wrote:
Am I right in thinking that this is now the canonical way to get a zope
3 instance:
http://pypi.python.org/pypi/zc.zope3recipes
?
If you still want an instance, yes. I don't particularly like instances
as we've had them with Zope 2 and Zope 3 (they don't quite work
Philipp von Weitershausen wrote:
http://pypi.python.org/pypi/zc.zope3recipes
?
If you still want an instance, yes. I don't particularly like instances
as we've had them with Zope 2 and Zope 3 (they don't quite work in a
WSGI environment).
So what do you do instead?
How do people get a