Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-7823

Always commit the transaction before sending the response

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.3.2
    • Fix Version/s: 5.5
    • Component/s: Web Common, WebDAV

      Description

      When transactions are activated, NuxeoRequestControllerFilter wraps the response in a CommittingServletResponseWrapper to ensure that a commit is done before any byte is sent to the client.

      But this means that the rest of the server processing will be done without a transaction present, which could be worse than the original solution for the problem (NXP-5129). The problem is that if the rest of the code runs without a transaction, any session opening for instance will not get a session whose invalidations have been processed so will potentially see invalid state.

      Instead should buffer the whole response, then commit in NuxeoRequestControllerFilter, then send the response. There should be a way to bypass this for processes that really need to stream a response to the client (file download).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: