Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-872

Only first request is successfull if NettyJaxrsServer+AsynchronousResponse is used

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 3.0.6.Final
    • None
    • jaxrs
    • None

    Description

      I try to build simplest NettyJaxrsServer REST service with async support.

      The server is configured according to documentation from official website. The issue is also repoducible from this class

      https://github.com/resteasy/Resteasy/blob/master/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/test/NettyContainer.java

      The service code is taken from documentation

      http://docs.jboss.org/resteasy/docs/3.0-beta-5/userguide/html/Asynchronous_HTTP_Request_Processing.html

      The service is deployed using the following code

      deployment.getResources().add(new SimpleResource());

      After the application starts I perform two curl runs

      $ curl -v http://localhost:8081/basic

      • About to connect() to localhost port 8081 (#0)
      • Trying ::1...
      • Connected to localhost (::1) port 8081 (#0)
        > GET /basic HTTP/1.1
        > User-Agent: curl/7.29.0
        > Host: localhost:8081
        > Accept: /
        >
        < HTTP/1.1 200 OK
        < Content-Type: text/plain
        < Content-Length: 5
        < Connection: keep-alive
        <
      • Connection #0 to host localhost left intact
        basic

      $ curl -v http://localhost:8081/basic

      • About to connect() to localhost port 8081 (#0)
      • Trying ::1...
      • Connected to localhost (::1) port 8081 (#0)
        > GET /basic HTTP/1.1
        > User-Agent: curl/7.29.0
        > Host: localhost:8081
        > Accept: /
        >
        < HTTP/1.1 204 No Content
        < Content-Length: 0
        < Connection: keep-alive
        <
      • Connection #0 to host localhost left intact

      Second time no content is received.

      The official documentation says that only Servlet 3.0 containers are supported by Resteasy in async mode. However Netty adapter appears to have code that should support async requests. Is is supported but not functioning? Then it is a bug and documentation should be updated. If this is not officially supported, then let's make this a feature request

      Attachments

        Activity

          People

            normanmaurer Norman Maurer (Inactive)
            igor-petruk Igor Petruk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: