ZServerHTTPResponse instance has no attribute 'SetHeader'
Hi, I found the following snippet of pythonscript in a howto. document=context.thesqlquery() container.REQUEST.RESPONSE.SetHeader('content-type','application/pdf') return document[0].Test10 The idea is fetching an PDF document from an MySQL database. But I get the error: ZServerHTTPResponse instance has no attribute 'SetHeader' Any ideas? Henny
it is setHeader and not SetHeader, replace container.REQUEST.RESPONSE.SetHeader('content-type','application/pdf') by container.REQUEST.RESPONSE.setHeader('content-type','application/pdf') that should work -- cn ======================= ZeOmega Southend road Bangalore, India Ph: 26632589 http://www.zeomega.com ====================== Henny van der Linde wrote:
Hi,
I found the following snippet of pythonscript in a howto.
document=context.thesqlquery() container.REQUEST.RESPONSE.SetHeader('content-type','application/pdf') return document[0].Test10
The idea is fetching an PDF document from an MySQL database.
But I get the error:
ZServerHTTPResponse instance has no attribute 'SetHeader'
Any ideas?
Henny
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Chandrakantha Nagaraja -
Henny van der Linde