PDF needs ExternalFile Object with byte-range capability?
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. Does anyone have an ExternalFile object? Also, I'd like to support byte-range serving. 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'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? Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com ICQ: 14856937 We must come down from our heights, and leave our straight paths, for the byways and low places of life, if we would learn truths by strong contrasts; and in hovels, in forecastles, and among our own outcasts in foreign lands, see what has been wrought upon our fellow-creatures by accident, hardship, or vice. - Richard Henry Dana, Jr. 1836
In response to your need to serve large .PDF files; I have a similar need to serve graphics files with my web pages. Instead of using ZopeHTTPServer, I've integrated Zope with IIS 4. I'll serve the content from Zope (via cgi) and the graphics directly from IIS. It seems to work well, you might consider combining Zope with your web server of choice... Jeff jeffniel@ix.netcom.com -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Brad Clements Sent: Wednesday, February 03, 1999 12:03 PM To: zope@zope.org Subject: [Zope] PDF needs ExternalFile Object with byte-range capability? 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. Does anyone have an ExternalFile object? Also, I'd like to support byte-range serving. 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'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? Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com ICQ: 14856937 We must come down from our heights, and leave our straight paths, for the byways and low places of life, if we would learn truths by strong contrasts; and in hovels, in forecastles, and among our own outcasts in foreign lands, see what has been wrought upon our fellow-creatures by accident, hardship, or vice. - Richard Henry Dana, Jr. 1836 _______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
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.
participants (3)
-
Brad Clements -
Jeff Nielsen -
Jim Fulton