Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12494

Incomplete chunked static resources from REST

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 11.0.7.Final, 12.0.0.Dev07
    • 11.0.5.Final, 12.0.0.Dev06
    • REST
    • None
    • Hide

      Execute a bash script to request a static resources that is delivered in chunks:

      for V in {1..100}
      do
         curl http://127.0.0.1:11222/console/app.bundle.js.map > f$V
      done
      

      The generated files on disk differ in length, sometimes the file gets truncated.

      Show
      Execute a bash script to request a static resources that is delivered in chunks: for V in {1..100} do curl http://127.0.0.1:11222/console/app.bundle.js.map > f $V done The generated files on disk differ in length, sometimes the file gets truncated.
    • Undefined

    Description

      The ResponseWriter.CHUNKED_FILE enum value has a try with resources around the RandomAccessFile to be served, so this can cause the file to be closed while still being written. The fix is to listen to the ctx.writeAndFlush future and close the file when the operation is complete.

      Attachments

        Activity

          People

            gfernand@redhat.com Gustavo Fernandes (Inactive)
            gfernand@redhat.com Gustavo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: