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

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

From: Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de>
Date: Mon, 05 Apr 1999 22:01:38 +0200
Message-Id: <370916A2.6C47FA66@informatik.med.uni-giessen.de>
To: "jigsaw@w3.org" <jigsaw@w3.org>, W3 Jigsaw Mailinglist <www-jigsaw@w3.org>

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
Received on Monday, 5 April 1999 16:00:41 GMT

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