[Zope] kludge around byteserving problem (2.4)

Farrell, Troy troy.farrell@wcg.com
Wed, 18 Jul 2001 15:56:51 -0500


<speculation type="mere">
Me thinks the Adobe (boo, hiss) plugin is using HTTP/1.1 to retreive _parts_
of the .pdf file.  ZServer does not support HTTP/1.1 completely, hence the
need for a hack.
</speculation>
I haven't looked at the HTTP requests and headers to verify.

Troy

-----Original Message-----
From: Kyler B. Laird [mailto:laird@ecn.purdue.edu]
Sent: Wednesday, July 18, 2001 3:52 PM
To: zope@zope.org
Subject: [Zope] kludge around byteserving problem (2.4)



It seems that 2.4.0b3 has a problem with
byteserving, but I haven't figured it out
enough to submit a problem report.  The
symptom, however, is that large (>32KB)
PDF objects can be downloaded and viewed
in an external helper app, but don't
appear in the Adobe plugin.

My kludge is to make a simple Python Script
that simply serves up the object's data.
	request = context.REQUEST
	RESPONSE =  request.RESPONSE

	objectname=str(request.other['traverse_subpath'][0])

	object=context[objectname]

	RESPONSE.setHeader('Content-type',
object.getProperty('content_type'))

	return object.data
This guarantees that no byteserving will
take place (because it's dynamic).  Named
"viewfilter", it's called as
	.../viewfilter/foo.pdf

I'll try to figure out what's really going
on and submit it to the tracker.

--kyler

_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )