Re: [PyWrapper-devel] Accessing HTTP data from pywrapper
Status: Alpha
Brought to you by:
jatorre
From: <m.d...@BG...> - 2006-11-13 10:19:41
|
That was easy. Its just another way of attaching the hook. Its done like this now with = saveHttpBody being the callback function: cherrypy.request.hooks.attach('before_request_body', saveHttpBody, = failsafe=3DNone, priority=3DNone) So go ahead with moby, javi! Markus > -----Original Message----- > From: pyw...@li...=20 > [mailto:pyw...@li...] On=20 > Behalf Of D=F6ring, Markus > Sent: Montag, 13. November 2006 10:20 > To: PyWrapper Developers mailing list > Subject: Re: [PyWrapper-devel] Accessing HTTP data from pywrapper >=20 >=20 > I will try to investigate later today. But really there=20 > shouldn't be a change. Try to dump all parameters for the=20 > request and see what gets into CP. >=20 > The parameter should be created here:=20 > http://trac.pywrapper.org/pywrapper/browser/trunk/webapp/pywrapper.py >=20 > In line 22 "def saveHttpBody():" >=20 >=20 > Ahh! Line 37 is commented out! > This is where the function above is assigned as a hook that=20 > gets executed before the body is being read. > #cpg.request.hooks['before_request_body']=3DsaveHttpBody >=20 > And that's something that has changed in CP3. you cannot=20 > declare a hook like this anymore I think. Shouldn't be hard:=20 > http://www.cherrypy.org/wiki/WhatsNewIn30#Hooks >=20 > Markus >=20 >=20 >=20 > > -----Original Message----- > > From: pyw...@li... > > [mailto:pyw...@li...] On=20 > > Behalf Of Javier privat > > Sent: Sonntag, 12. November 2006 20:09 > > To: PyWrapper Developers mailing list > > Subject: [PyWrapper-devel] Accessing HTTP data from pywrapper > >=20 > >=20 > > Hey Markus, > >=20 > > I am trying to debug biomoby in my machine, but I get a very strange > > behaviour I think since we moved to cherrypy 3.0 > >=20 > > When I do this in the biomoby request class > >=20 > > stdin, length =3D self.getPara > > (cfgObj.PyWrapper.httpBodyParameter, (None,None)) > > if stdin is None: > > log.warn("No request message found.") > > raise RequestParsingError("No SOAP message=20 > found in =20 > > the request") > >=20 > > Seems that I always get stdin is None and therefore can not > > catch the =20 > > biomoby request... Any idea? > >=20 > > I am trying with dashboard so I suppose I am really sending > > something =20 > > to pywrapper, but I lost the little program I was using to debug =20 > > traffic, do you remember the name of the tool for mac os x=20 > to trace =20 > > traffic? > >=20 > > Cheers. > >=20 > > -------------------------------------------------------------- > > ----------- > > Using Tomcat but need to do more? Need to support web > > services, security? Get stuff done quickly with=20 > > pre-integrated technology to make your job easier Download=20 > > IBM WebSphere Application Server v.1.0.1 based on Apache=20 > > Geronimo=20 > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > _______________________________________________ > PyWrapper-devel mailing list PyW...@li... > https://lists.sourceforge.net/lists/listinfo/pywrapper-devel >=20 > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web=20 > services, security? Get stuff done quickly with=20 > pre-integrated technology to make your job easier Download=20 > IBM WebSphere Application Server v.1.0.1 based on Apache=20 > Geronimo=20 > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& dat=3D121642 _______________________________________________ PyWrapper-devel mailing list PyW...@li... https://lists.sourceforge.net/lists/listinfo/pywrapper-devel |