Thanks for the reply!
I'm not exactly sure why, but setting the Content-Length header doesn't work
as expected. It behaves as though the content length was never specified,
i.e. the download reads Downloading at 1432k, unknown file size; This is
still better than before, but it would be great if I could get this to work.
Thanks again!
Spencer
On 12/27/05, Paul Cantrell <[EMAIL PROTECTED]> wrote:
>
> The HTTP spec says:
>
> "Any Content-Length greater than or equal to zero is a valid
> value."
>
> So pretty clearly, the protocol allows it, and ServletReponse ought
> to declare it as long instead of int. I'm note sure whether FTP or
> Samba are actually any easier or more reliable than HTTP....
>
> You could try:
>
> webResponse.setHeader("Content-Length", String.valueOf(longSize));
>
> That might work.
>
> Cheers,
>
> Paul
>
>
> On Dec 27, 2005, at 8:15 AM, Schabek Ćukasz wrote:
>
> > I think it's not good idea to send such huge amount of data using http
> > protocol,
> > It's much easier do it with ftp or samba.
> >
> >
> > -----Original Message-----
> > From: Spencer Crissman [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, December 27, 2005 2:33 PM
> > To: Tapestry User Mailing List
> > Subject: Maximum WebResponse.contentLength
> >
> > I have created a download service and modeled it on the asset service.
> > Users of my application must be able to download fairly large
> > files, and the
> > application works for the most part, however we've had a few
> > exceptional
> > cases where the files were really huge (>2 Gb).
> >
> > The asset service uses WebResponse and sets its content length, and
> > I was
> > doing likewise, however the setContentLength takes an integer, and
> > so the
> > really large files are causing an overflow error.
> >
> > My question is, is there a technical reason why the contentLength
> > is an
> > integer and not a long, or was that an arbitrary decision (can web
> > responses
> > be >2Gb)?
> >
> > If it is technically possible to have responses >2Gb, can I get
> > around this
> > by simply not setting the contentLength and just streaming the
> > resulting
> > bytes, instead, or is that not safe.
> >
> > Thanks for your help.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> _________________________________________________________________
> Piano music podcast: http://inthehands.com
> Other interesting stuff: http://innig.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>