-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Peter,
Peter Kennard wrote:
> I have some real mysterious behavior, it seems the first chunk just doesn't
> make it into the output. Doesn't matter how long or short it is.
> Seems like a BUG unless I'm doing something wrong.
This code looks fine, except you didn't provide all of the code (where
does txt come from)?
> public void service( ServletRequest req,
> ServletResponse res)
> throws IOException, ServletException
> {
> java.io.OutputStream os = res.getOutputStream();
> for(int i = 0; i < 5; ++i)
> {
> String txt = "Some Text " + i + "\n";
> os.write(txt.getBytes());
> os.flush();
> }
> }
>
> /**** the results in a purely socket based client (ie exactly what is sent
> back - all appropriate except the "Some Text 0" is plain missing
> !!! */
Have you checked the result with a hex editor or anything like that? Is
it possible that txt.getBytes() in the first loop iteration is giving
you some text with a CR in it? It so, your terminal could be overwriting
the text with the next line of output, even though it's really there.
Just a shot in the dark.
Try piping wget through od and see what falls out.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF9BVr9CaO5/Lv0PARAjTkAJ9XYVRmi5tEj28dpiOoFeoTFf67IQCgiGgV
aj3bDsRs0jHTo3wdXeRp0DU=
=ydBR
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]