Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4840

Asynchronous IO fails in webconsole plugin

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: webconsole-4.2.8
    • Fix Version/s: webconsole-4.2.18
    • Component/s: Web Console
    • Labels:
      None

      Description

      Issue

      The following function call always returns with true:

      ServletRequest.isAsyncSupported()
      

      However, async calls fail even if the webconsole plugin tries to provide some resource (with some special extension on the end of the URI).

      Reason

      In the end of the OSGiManager.service(ServletRequest, ServletResponse) function, there is the following:

              // ensure response has been sent back and response is committed
              // (we are authorative for our URL space and no other servlet should interfere)
              res.flushBuffer();
      

      Due to the reason that flushBuffer() function is called, any asynchronous handling will fail with an exception.

      Proposed solution

      • In case the webconsole plugin is rendered (the path ends with / or .html), the request.isAsyncSupported() method call should return false
      • In case a custom resource is provided by the webconsole plugin (any extension but html on the end of the path) the flushBuffer() method should not be called

      At least the second part of the fix should be implemented as if a plugin wants to provide bigger files (like a dump), async support can be useful. Also, by the time more and more libraries will support asynchronous IO to provide resources and if a webconsole plugin uses such library, it will fail.

        Attachments

          Activity

            People

            • Assignee:
              cziegeler Carsten Ziegeler
              Reporter:
              balazs.zsoldos Balazs Zsoldos
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: