Re: "BUG found !?" or "a question..." / was: Re: jigsaw 2.0.2 bug in servlet API !?

flushStream is called only by ServletWrapper after the service method call,
so the get method is done at this time.

But, may be there could be a problem in some case, please add the line:
out.flush();
just before the reply.setContentLength(out.size());

Could you try this and tell me if the bug is still there? If not could you
check (by adding some trace) if out.size() is equals to the Content Length
you specified in your servlet?

Regards,Benoit.

Roland Mainz wrote:

> Hi !
>
> ----
>
> Roland Mainz wrote:
>
> > The following code does NOT work, and the question is: WHY ?
> > The file downloaded by the browser is different in size from the
> > original file,and ZIP
> > files are not recogzized as such by WinZip 7.0 (reg).
> > (Method d( String ) is only a logging function).
> >
> > di.filename       ="dk-lite.zip";
> > di.contenttype = "application/octet-stream";
> >
> > It doesn't matter if I use a BufferedINputStream instead of the plane
> > FileInputStream
> > as input, and it doesn't matter to move getOutputStream behind the
> > setContentType
> > method call...
> > It doesn't matter to use the int-copy-loop below, or the 256-byte copy
> > loop which is
> > commented-out here.
>
> ...and so on...
> I found - maybe - a part of the puzzle...
>
> Question: Why does org.w3c.jigsaw.servlet.JIgsawHttpServletResponse.flushStream()
> call reply.setContentLength() ? IMHO corrupts this any previous, servlet-"made"
> setContentLength call (this assumes that flushStrean() is called after servlet's
> doGet()
> is done...).
>
> ----
>
> Bye,
> Roland
>
> --
>   __ .  . __
>  (o.\ \/ /.o)  Roland Mainz                               C programmer
>   \__\/\/__/   Roland.Mainz@informatik.med.uni-giessen.de MPEG specialist
>   /O /==\ O\   gisburn@w-specht.rhein-ruhr.de             Sun&&Amiga programmer
>  (;O/ \/ \O;)  TEL +49 (0) 2426901568  FAX +49 (0) 2426901569

--
- Benoît Mahé -------------------------------------------------------
                      World Wide Web Consortium (W3C)
                    Architecture domain - Jigsaw Team

  http://www.w3.org/People/Mahe - bmahe@w3.org - +33.4.92.38.79.89
---------------------------------------------------------------------

Received on Tuesday, 6 April 1999 04:22:08 UTC