Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2739

Completing Async web request does not respect keepAlive flag

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.1.0.Alpha1
    • Fix Version/s: 7.1.0.CR1
    • Component/s: Web
    • Labels:
      None
    • Environment:

      linux centos 64bit
      sun JDK 1.6

    • Steps to Reproduce:
      Hide

      Run an async servlet in jboss behind a web proxy such as nginx with proxy_buffering on (the default).
      Observe (by logging etc.) that the client browser does not receive the respose data for 1 minute after the server side asyncContext.complete().
      An iptables log confirms that async connections are held open for 1 minute after the response data was written, whereas non-async requests are closed immediately.

      Show
      Run an async servlet in jboss behind a web proxy such as nginx with proxy_buffering on (the default). Observe (by logging etc.) that the client browser does not receive the respose data for 1 minute after the server side asyncContext.complete(). An iptables log confirms that async connections are held open for 1 minute after the response data was written, whereas non-async requests are closed immediately.
    • Workaround Description:
      Hide

      Edit the code of line 802 from
      return (pipelined) ? SocketState.CLOSED : SocketState.OPEN;
      to
      return (pipelined) ? SocketState.OPEN : SocketState.CLOSED;
      and rebuild jbossweb-7.0.3.Final.jar

      Show
      Edit the code of line 802 from return (pipelined) ? SocketState.CLOSED : SocketState.OPEN; to return (pipelined) ? SocketState.OPEN : SocketState.CLOSED; and rebuild jbossweb-7.0.3.Final.jar

      Description

      Servlet 3.0 page call AsyncContext.complete() sometime after startAsync()
      The web request has no more input.
      The socket connection should be closed if KeepAlive is false, but it remains open for 60 more seconds.
      Code debugging indicates a bug on line 802 of org.apache.coyote.http11.Http11AprProcessor.java
      http://anonsvn.jboss.org/repos/jbossweb/tags/JBOSSWEB_7_0_3_FINAL/java/org/apache/coyote/http11/Http11AprProcessor.java
      It returns the socket close flag for unfinished requests instead of finished requests.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rmaucher Remy Maucherat
                  Reporter:
                  davidw53 David White
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: