W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 1999

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

From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
Date: Tue, 06 Apr 1999 10:21:59 +0200
Message-ID: <3709C427.E3A7E507@sophia.inria.fr>
To: Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de>
CC: "jigsaw@w3.org" <jigsaw@w3.org>, W3 Jigsaw Mailinglist <www-jigsaw@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:29 GMT