Hi, On Mon, Feb 8, 2016 at 1:41 PM, John Jiang <[email protected]> wrote: > Hi Simone, > > 2016-02-07 18:43 GMT+08:00 Simone Bordet <[email protected]>: >> >> Hi, >> >> On Fri, Feb 5, 2016 at 6:30 AM, John Jiang <[email protected]> >> wrote: >> > Hi guys, >> > It seems that Jetty HTTP/2 server cannot be connected via its HTTP/1 >> > client >> > (org.eclipse.jetty.client.HttpClient). >> > The error likes: Illegal character 0x0 in state=START for buffer... >> >> If you get this error, you are not using a HTTP/1.1 client to connect >> to the server, but a HTTP/2 client. > > The following is my test method, > public void tes() throws Exception, InterruptedException, > ExecutionException, TimeoutException { > SslContextFactory sslContextFactory = new SslContextFactory(); > sslContextFactory.setSslContext(...); > String url = ...; > HttpClient client = new HttpClient(sslContextFactory); > client.start(); > HttpRequest request = (HttpRequest) client.newRequest(url); > System.out.println(request); > ContentResponse response = request.send(); > System.out.println(response.getStatus()); > client.stop(); > } > > I think I'm using HTTP/1.1 client.
Lots of stuff omitted, but you are using HTTP/1.1. Does this request hit Jetty or does it hit Apache ? Are you sure that the TLS setup is ok ? We have many tests in the Jetty test suite that are setup in the same way, and they work fine, so if you can post both client and server full code will be easier to help you. -- Simone Bordet ---- http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. _______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
