Skip to content

Commit c2d6cea

Browse files
committed
Support query strings.
1 parent 1ae6218 commit c2d6cea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/com/codebutler/android_websockets/WebSocketClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public void run() {
5252
int port = (mURI.getPort() != -1) ? mURI.getPort() : (mURI.getScheme().equals("wss") ? 443 : 80);
5353

5454
String path = TextUtils.isEmpty(mURI.getPath()) ? "/" : mURI.getPath();
55+
if (!TextUtils.isEmpty(mURI.getQuery())) {
56+
path += "?" + mURI.getQuery();
57+
}
5558

5659
String originScheme = mURI.getScheme().equals("wss") ? "https" : "http";
5760
URI origin = new URI(originScheme, mURI.getSchemeSpecificPart(), null);

0 commit comments

Comments
 (0)