ah, that's a different ballgame - can you confirm that things work well with smaller files?
Geoff > -----Original Message----- > From: Andre Juffer [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 06, 2003 12:48 PM > To: [EMAIL PROTECTED] > Subject: Re: File downloading with cocoon > > > > > Geoff Howard wrote: > > Have you tried setting the expires parameter of the map:reader > definition to > > some reasonable value? I have recently noticed some similar but not > > identical behavior trying to download using the resource reader with no > > expires value. > > Yes, I had that already. This is what I currently have in the sitemap: > > <map:readers default="resource"> > <map:reader src="org.apache.cocoon.reading.ResourceReader" > logger="sitemap.reader.resource" > pool-max="32" pool-min="1" pool-grow="4"> > <!-- optional reader configuration --> > <map:parameter name="expires" value="86400000"/> > </map:reader> > </map:readers> > > The expires value would correspond to 1 day. > > What happens is that a 20 Mb file gives me trouble. The file is being > downloaded up to about 78% of its size. And that's it. The process > simply stops. > > Thanks for your help, > Andre. > > > > > > > Geoff Howard > > > > > >>-----Original Message----- > >>From: Andre Juffer [mailto:[EMAIL PROTECTED]] > >>Sent: Monday, January 06, 2003 4:20 AM > >>To: cocoon-users > >>Subject: File downloading with cocoon > >> > >> > >>Hi, > >> > >>I am having some trouble with the following. I want users to be able to > >>download some zip (or any type) files. So, I have put in the sitemap the > >>following: > >> > >><map:match pattern="course-material/**.zip"> > >> <map:act type="action-retrieve-lecture-notes"> > >> <map:read type="resource" src="LectureNotes/{../1}.zip" > >>mime-type="application/zip" /> > >> </map:act> > >> <map:redirect-to uri="../lecture-notes" /> > >></map:match> > >> > >>The action simply checks if the user is allowed to access the zip files. > >> And if not, the user is being redirected to a login page > >>(../lecture-notes). This login form makes use of the same action > >>(action-retrieve-lecture-notes), which also ensures that the user is > >>pointed to the appropriate file that is to be downloaded (and this > >>depends on some login information, including a course id). > >> > >>All this works quite nicely, except that the <map:read> does not really > >>start up a download process. That is, it causes all the steps > >>necessarily and the user is being asked what to do with the file (save > >>it, open it, etc) like any other download process, but the file that is > >>being downloaded has a file size of zero. But the file that is accessed > >>locally is the correct one: I have checked the cocoon log files. There > >>is no problem with the file itself (I have placed it into a publically > >>accessible location served directly by the Apache webserver and had no > >>problems with downloading the file.) > >> > >>So what to do? I was thinking that it is maybe some caching issue. Some > >>of the files to be downloaded can be fairly large (there is one file of > >>about 20 Mb). > >> > >>I am using cocoon-2.0.4, java 1.4.0_01 and Tomcat 4.0.4. > >> > >>Thanks for any help. > >> > >>-- > >>Andre H. Juffer | Phone: +358-8-553 1683 > >>The Biocenter and | Fax: +358-8-553-1141 > >> the Dep. of Biochemistry | Email: [EMAIL PROTECTED] > >>University of Oulu, Finland | WWW: > > > > http://www.biochem.oulu.fi/Biocomputing/ > > > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > > > > > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > > > -- > Andre H. Juffer | Phone: +358-8-553 1683 > The Biocenter and | Fax: +358-8-553-1141 > the Dep. of Biochemistry | Email: [EMAIL PROTECTED] > University of Oulu, Finland | WWW: http://www.biochem.oulu.fi/Biocomputing/ --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>