Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1367

HttpServerExchange#getRequestChannel is read 0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Critical
    • None
    • 2.0.7.Final
    • Core
    • None

    Description

      I read request body in Scala like this:

         val fileChannel: FileChannel = ...
         val rcl = exchange.getRequestContentLength
         val size = event.file.append(event.header, exchange.getRequestChannel)
         val size = fileChannel.transferFrom(exchange.getRequestChannel, 0, 1024 * 1024 * 4)
         logger.info(s"Request content length: $rcl, read body size: $size”)
      

      Sometimes, my file is empty and the logger well be output like this:

      Request content length: 907, read body size: 0
      

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            aiyanbo_jira Andy Ai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: