Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-689

HttpAsyncServer with TLsStrategy Error in BasicParseLine

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Feedback Received
    • 5.1
    • None
    • Examples, HttpCore
    • None
    • Mac OS 11.6 / Maven 3.8.1 / AdoptOpenJDK-11.0.11+9

    Description

      I've being followed the example in https://github.com/apache/httpcomponents-core/blob/5.1.x/httpcore5/src/test/java/org/apache/hc/core5/http/examples/AsyncFileServerExample.java

      This example is working as expected. However when I try to implement a SSLContext with the method:

      final HttpAsyncServer server = AsyncServerBootstrap.bootstrap().setIOReactorConfig(config)                .setTlsStrategy(new BasicServerTlsStrategy(sslContext))
      ...
      
      

      After triggering a http request, the parseLine is failing with:

      Exception has occurred: org.apache.hc.core5.http.ParseException"org.apache.hc.core5.http.ParseException: Invalid request line; error at offset 31: <[0x2b][0x2c][0x2d][0x2e]ß[0x30][0x31][0x32]Û[0x34][0x35]WåT¾±)•âJ3Ëɇ€k{Eµ’>"
      

      I'm not sure if the HTTPS (TLS) handshake is not working as expected in the non-blocking message transport classes, because SSLContext it's working fine in booking classes.

      Or could you provide an example to create a HttpAsyncServer with HTTPS (TLS)

      Attachments

        Activity

          People

            Unassigned Unassigned
            andressolm96 Andres
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: