Andres created HTTPCORE-689:
-------------------------------

             Summary: HttpAsyncServer with TLsStrategy Error in BasicParseLine
                 Key: HTTPCORE-689
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-689
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: Examples, HttpCore
    Affects Versions: 5.1
         Environment: Mac OS 11.6 / Maven 3.8.1 / AdoptOpenJDK-11.0.11+9
            Reporter: Andres


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:
{code:java}
final HttpAsyncServer server = 
AsyncServerBootstrap.bootstrap().setIOReactorConfig(config)                
.setTlsStrategy(new BasicServerTlsStrategy(sslContext))
...

{code}
After triggering a http request, the parseLine is failing with:
{code:java}
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µ’>"
{code}

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)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to