Hi,
I'm using Jetty 9.3.5, and take advantage of ProxyServlet as a tunnel proxy.
Please consider the following test codes,

********************************
SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setSslContext(sslContext);

HttpClient client = new HttpClient(sslContextFactory);
client.getProxyConfiguration().getProxies().add(new HttpProxy(new
Origin.Address(host, port), true));
client.start();

String url = "http://host:port/xxx";;
ContentResponse response = client.newRequest(url).send();
System.out.println(response.getContentAsString());
client.stop();
********************************

If the url is HTTP path, it works well.But if the url is HTTPS path, say,
https://host:sslPort/xxx, it reports 404 error.
The exception shows some message, like
org.eclipse.jetty.client.HttpResponseException: Received
HttpResponse[HTTP/1.1 404 Not Found]@1aed4133 for HttpRequest[CONNECT
host:sslPort HTTP/1.1]@5b1d67b3

I have set SSL context for the client. What is missing?

Thanks!
_______________________________________________
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

Reply via email to