Skip to content

Commit d3aebfc

Browse files
committed
1 parent dc124b3 commit d3aebfc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

providers/grizzly/src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,8 @@ private boolean sendAsGrizzlyRequest(final Request request,
844844
}
845845
final URI uri = AsyncHttpProviderUtils.createUri(httpCtx.requestUrl);
846846
final HttpRequestPacket.Builder builder = HttpRequestPacket.builder();
847-
boolean secure = "https".equals(uri.getScheme());
847+
final String scheme = uri.getScheme();
848+
boolean secure = "https".equals(scheme) || "wss".equals(scheme);
848849
builder.method(request.getMethod());
849850
builder.protocol(Protocol.HTTP_1_1);
850851
String host = request.getVirtualHost();
@@ -861,6 +862,7 @@ private boolean sendAsGrizzlyRequest(final Request request,
861862
final boolean useProxy = (proxy != null);
862863
if (useProxy) {
863864
if ((secure || httpCtx.isWSRequest) && !httpCtx.isTunnelEstablished(ctx.getConnection())) {
865+
ctx.notifyDownstream(new SwitchingSSLFilter.SSLSwitchingEvent(false, ctx.getConnection()));
864866
secure = false;
865867
httpCtx.establishingTunnel = true;
866868
builder.method(Method.CONNECT);

0 commit comments

Comments
 (0)