Skip to content

Commit 2694818

Browse files
committed
Fix wrong logic for redirecting websocket
1 parent 2ea71a6 commit 2694818

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,7 @@ private boolean redirect(Request request,
20042004
final boolean initialConnectionKeepAlive = future.getKeepAlive();
20052005
future.setURI(uri);
20062006
String newUrl = uri.toString();
2007-
if (future.getNettyRequest().getUri().startsWith(WEBSOCKET)) {
2007+
if (request.getUrl().startsWith(WEBSOCKET)) {
20082008
newUrl = newUrl.replace(HTTP, WEBSOCKET);
20092009
}
20102010

0 commit comments

Comments
 (0)