1 Reply Latest reply on Jan 4, 2005 2:05 PM by tomdee

    JBoss 3.2.6 + embedded TC truncates a HTTP PUT

    tomdee

      Env: JBoss 3.2.6 with default TC 5 jboss web
      OS : Win2K Server
      JDK: Sun 1.4.2_06-b03

      when a client performs a HTTP PUT of 141 bytes , at the servlet level
      i am only able to read 137 bytes out of the InputStream

      below is a snippet of code.

      InputStream is = req.getInputStream();
      byte[] buf = new byte[1024];
      int readBytes = 0;
      int totalBytes = 0;
      while ( (readBytes= is.read(buf)) != -1) {
      totalBytes += readBytes;
      }
      is.close();
      System.out.println( "bytes read " + totalBytes );

        • 1. Re: JBoss 3.2.6 + embedded TC truncates a HTTP PUT
          tomdee

          Just an FYI, this turns out to be a bug in Tomcat logged against TC 5.2.x
          as bug # 30135

          If you are using HTTP header

          transfer-encoding = chunked

          and specify Content-Length = xxx at the same time, TC will exhibit this behavior

          Unfortunately as per TC bug, this won't be fixed.