[Zope] <dtml-var REQUEST.get('BODY','')>

Chui Tey Chui.Tey@env.qld.gov.au
Thu, 23 Sep 1999 09:53:14 +1000


Zope spat the first one out:

Error Type: KeyError
Error Value: REQUEST['BODY']

Apparently there is no BODY in the namespace.

The second case, nothing (ie. '') is returned. I looked in the source
and apparently get(x,y) sets the attribute x to value y if x does not
exist.

The strange thing is that if I wrote a python external method with
REQUEST.get('BODY',''), I can get the body returned. What would one do
with an unparsed body in a html document is a moot point, but I am
trying to debug a POST from another software and I wanted to see what is
being done by the client.

Is there anything in Python that echoes the conversation of a socket?

Chui


Phil Harris wrote:
> 
> Did you try
> 
> <dtml-var "REQUEST['BODY']">
> 
> or even
> 
> <dtml-var "REQUEST.get('BODY','')">
> 
> HTH
> 
> Phil
> phil@philh.org
> 
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Chui
> Tey
> Sent: Wednesday, September 22, 1999 5:01 AM
> To: zope@zope.org
> Subject: [Zope] <dtml-var REQUEST.get('BODY','')>
> 
> What is wrong with this bit here?
> 
> <dtml-var standard_html_header >
> <dtml-var REQUEST.get('BODY','') >
> <dtml-var standard_html_footer >
> 
> Why is it I can't display the body of a HTTP Request? I have also tried,
> <dtml-var "REQUEST.get('BODY','')" >
> but still got nothing.
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )