diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java index 98e5b2e8b..013e687fb 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttpAsyncClient.java @@ -150,6 +150,11 @@ class InternalHttpAsyncClient extends AbstractHttpAsyncClientBase { log.debug(exchangeId + ": preparing request execution"); } + //TODO remove when fixed in HttpCore + if (route.isTunnelled()) { + throw new HttpException("HTTP tunneling not supported"); + } + setupContext(clientContext); final AsyncExecChain.Scope scope = new AsyncExecChain.Scope(exchangeId, route, request, clientContext, execRuntime);