Menu

#1 OutputStream problem...?

open-fixed
nobody
None
5
2001-12-18
2001-07-28
Anonymous
No

The server can only output 8192 bytes. If a file is
served using FileSystemServlet, only the first 8k
bytes show up, the rest is lost... Same with image
files, etc.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I found the problem... in SimpleServletOutputStream after
    the write, and bufCnt increment, the test should be:

    if (bufCnt >= bufferSize) { ....

    not

    if (bufCnt > bufferSize) { ....

    The ArrayIndexOutOfBounds exception is being silently
    caught somewhere. The write fails after writing the last
    byte in the buffer, plus bufCnt doesn't get reset to zero.

    later

     
  • Mattias Larsson

    Mattias Larsson - 2001-12-18
    • status: open --> open-fixed
     
  • Mattias Larsson

    Mattias Larsson - 2001-12-18

    Logged In: YES
    user_id=17396

    above fix applied to cvs

     

Log in to post a comment.

MongoDB Logo MongoDB