[Zope] kludge around byteserving problem (2.4)

Kyler B. Laird laird@ecn.purdue.edu
Wed, 18 Jul 2001 15:52:04 -0500


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