Zope large PDF question

Kyler Laird Kyler at news.Lairds.org
Thu Apr 10 18:23:16 EDT 2003


On comp.lang.python, davec999 at yahoo.co.uk (David Currie) writes:

>> As I recall, Reader sends a request for pieces of a
>> large file
>> 	1-500, 1001-1500, 501-1000
>> and Zope decides to be efficient and join all of the
>> contiguous regions.  Unfortunately, that defeats the
>> purpose of requesting the ranges *and* breaks Reader.

>I see.  Is there any chance of explaining how to disable this
>behaviour, or even better, of sharing the patch? ;)

Oh, fine...dig, dig, dig...  Shouldn't this be online
somewhere?  I posted the patch on a Zope mailing list.
dig, dig, dig...  Grrr...it's not in my past year's 
mail.

Lessee...the problem is in OFS/Image.py.  It doesn't
look like my current Zopes have the patch, but you
should be able to disable byterange support by commenting
out all of these lines.
	RESPONSE.setHeader('Accept-Ranges', 'bytes')
You might also need to set range/request_range to None.

Sorry I'm not clearer on this.  I've copied the list in
case someone with more understanding feels like jumping
into the discussion.

--kyler




More information about the Python-list mailing list