>>> [EMAIL PROTECTED] 07/09/03 10:44PM >>>
>See below...

>On Wed, 2003-07-09 at 15:10, Michael Wille wrote:
>> Hello All,
>> byte[] buffer = new byte[1024];
>> int numBytes = 0;
>> int totalBytes = 0;
>> while(totalBytes < fileLength) {
>>     numBytes = fis.read(buffer);
>>     totalBytes += numBytes;
>>     outStream.write(buffer);
>> } 
>
>You don't want to write the whole buffer, just what was read. Try 
>write(buffer, 0, numBytes )

I've made that change you suggested, but I doubt that would cause the problem we are 
seeing.  Wouldn't it simply corrupt the file itself?

Here is a screenshot of the junk response we get:
http://phatness.com/~kmw/error.gif

In it, you can see the garbage being sent to the client, then the actual HTTP headers.

Thanks,
Mike

Reply via email to