[Zope] ZServerHTTPResponse instance has no attribute 'SetHeader'

Chandrakantha Nagaraja cnagaraj at zeomega.com
Mon Aug 23 14:27:24 EDT 2004


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 at 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 )
>  
>




More information about the Zope mailing list