[Zope-Checkins] CVS: Zope2 - ObjectManager.py:1.121.4.20

andreas@serenade.digicool.com andreas@serenade.digicool.com
Mon, 25 Jun 2001 16:15:35 -0400


Update of /cvs-repository/Zope2/lib/python/OFS
In directory serenade:/tmp/cvs-serv29235/lib/python/OFS

Modified Files:
      Tag: zope-2_3-branch
	ObjectManager.py 
Log Message:
Collector # 2338: re-applied patch of Collector #2124 (seems
to have been partially lost).



--- Updated File ObjectManager.py in package Zope2 --
--- ObjectManager.py	2001/04/21 18:32:45	1.121.4.19
+++ ObjectManager.py	2001/06/25 20:15:33	1.121.4.20
@@ -517,9 +517,10 @@
             f=StringIO()
             if toxml: XMLExportImport.exportXML(ob._p_jar, ob._p_oid, f)
             else:     ob._p_jar.exportFile(ob._p_oid, f)
-            RESPONSE.setHeader('Content-type','application/data')
-            RESPONSE.setHeader('Content-Disposition',
-                'inline;filename=%s.%s' % (id, suffix))
+            if RESPONSE is not None:
+                RESPONSE.setHeader('Content-type','application/data')
+                RESPONSE.setHeader('Content-Disposition',
+                    'inline;filename=%s.%s' % (id, suffix))
             return f.getvalue()
 
         f=Globals.data_dir+'/%s.%s' % (id, suffix)