Jetty
  1. Jetty
  2. JETTY-1504

HttpServletResponseWrapper ignored when using asyncContext?

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 8.1.2
    • Fix Version/s: 7.6.3, 8.1.3
    • Component/s: HTTP, Servlet
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Hello guys,
      From my investigation it seems that HttpServletResponseWrapper is ignored when using async context.
      org.eclipse.jetty.server.AsyncContinuation only returns provided wrapped response is flag _responseWrapped is set:
      public ServletResponse getResponse()

      { if (_responseWrapped && _event!=null && _event.getSuppliedResponse()!=null) return _event.getSuppliedResponse(); return _connection.getResponse(); }

      the flag can only be set to true in method:
      public void suspend(ServletResponse response)
      but this method is not called when creating async context.

      In class org.eclipse.jetty.server.Request in method
      public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse)
      the other version of suspend is called, which does not set the _responseWrapped flag, namely:
      _async.suspend(_context,servletRequest,servletResponse);

      is this is bug? Shouldn't the other suspend method (the one with 3 arguments) also check for wrapped servlet responses?

        Activity

        Hide
        Jan Bartel added a comment -

        You're right! Fixed.

        Show
        Jan Bartel added a comment - You're right! Fixed.

          People

          • Assignee:
            Jan Bartel
            Reporter:
            Lukasz Lichota
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: