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)
from httplib import HTTPConnection
c = HTTPConnection('localhost:8080')
c.request('POST','/@@wasp','foo',{'Content-type':'text/plain',
                                   'Content-length':3})
print c.getresponse().read()

...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?

cheers,

Chris


-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to