Skip to content

Commit 44fb654

Browse files
committed
Fix for AsyncHttpClient#111 - [websocket] Both Netty and Grizzly issues with URI without port.
1 parent 9c34195 commit 44fb654

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,9 @@ static int getPort(final URI uri, final int p) {
522522
int port = p;
523523
if (port == -1) {
524524
final String protocol = uri.getScheme().toLowerCase();
525-
if ("http".equals(protocol)) {
525+
if ("http".equals(protocol) || "ws".equals(protocol)) {
526526
port = 80;
527-
} else if ("https".equals(protocol)) {
527+
} else if ("https".equals(protocol) || "wss".equals(protocol)) {
528528
port = 443;
529529
} else {
530530
throw new IllegalArgumentException("Unknown protocol: " + protocol);

0 commit comments

Comments
 (0)