[Zope] PDF needs ExternalFile Object with byte-range capability?

Jim Fulton jim.fulton@digicool.com
Thu, 04 Feb 1999 10:11:43 -0500


Brad Clements wrote:
> 
> I need to start serving large .PDF files from my ZopeHTTPServer.
> 
> I'm thinking that I'd rather not put the actual data into bobo.

Why?

> Does anyone have an ExternalFile object?
> 
> Also, I'd like to support byte-range serving.

Is this a high priority?  There is some possibility
that we might implement this in ZServer at some point.
Then again, perhaps it would be better to do this for 
Files (and Images) directly.

> I'm thinking that I could
> modify Image.py File class, in index_html check to see if REQUEST
> has a byte-range heading, if so use a range on self.data, as in return
> self.data[startoffset:endoffset]

I'm interested to see what you come up with.  It should apply to
Files too.
 
> I'd also have to set RESPONSE headers. I'm concerned about getLen
> and len methods. Are they used to set the content-length response
> header? If I set a content-length header myself will that over-ride Zope's
> default process of setting the length?

Yes.

Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.