Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7767

Support 100-Continue in Undertow transport

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.4
    • 3.2.6
    • Transports
    • None
    • Unknown

    Description

      One of our clients always sends 'Expect: 100-continue' headers and expects the server to respond with status code 100 Continue before sending the payload of the request. With transport untertow, this is currently not supported (we see an additional delay of 2s per request)

      The issue can be resolved by wiring in the io.undertow.server.handlers.HttpContinueReadHandler.

      For example modifying these lines works:

      https://github.com/apache/cxf/blob/master/rt/transports/http-undertow/src/main/java/org/apache/cxf/transport/http_undertow/UndertowHTTPServerEngine.java#L211-L221

      if (url.getPath().length() == 0) {
        result = result.setHandler(Handlers.trace(new HttpContinueReadHandler(undertowHTTPHandler)));
      } else {
        if (undertowHTTPHandler.isContextMatchExact()) {
          this.path.addExactPath(url.getPath(), new HttpContinueReadHandler(undertowHTTPHandler));
        } else {
          this.path.addPrefixPath(url.getPath(), new HttpContinueReadHandler(undertowHTTPHandler));
        }
        result = result.setHandler(this.wrapHandler(this.path));
      }
      

      Alternative impl to integrate this handler in UndertowHTTPHandler.
      Also the config should really be set via cxf.xml.

      Test case:

      • Deploy a simple SOAP service using javax.xml.ws.Endpoint.publish
      • Configure SoapUI in preferences > HTTP Settings (Expect-Continue: true)
      • Call a SOAP operation

      100-Continue is well supported in the jetty transport, but with netty we see a similar issue. With netty the server hangs and doesn't respond

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            wsalembi Willem Salembier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: