diff options
author | Hiroshi Ichikawa <gimite@gmail.com> | 2011-03-01 23:28:04 +0900 |
---|---|---|
committer | Hiroshi Ichikawa <gimite@gmail.com> | 2011-03-01 23:28:04 +0900 |
commit | d7ab7546570d83ad7fcd65c84b3dab45d003b6e7 (patch) | |
tree | c02afd587777bd70877ddabb9d53d707a4fa3361 | |
parent | 0a09afaf9bc5a34483c4f8dfe9d21a64da110bff (diff) | |
download | web-socket-js-d7ab7546570d83ad7fcd65c84b3dab45d003b6e7.tar.gz |
Fixing a bug that it doesn't accept URL such as ws://myserver:8080?room=blah .
https://github.com/gimite/web-socket-js/issues/59
-rw-r--r-- | WebSocketMain.swf | bin | 175725 -> 175746 bytes | |||
-rw-r--r-- | WebSocketMainInsecure.zip | bin | 166519 -> 166597 bytes | |||
-rw-r--r-- | flash-src/WebSocket.as | 4 |
3 files changed, 2 insertions, 2 deletions
diff --git a/WebSocketMain.swf b/WebSocketMain.swf Binary files differindex f6f927a..244c445 100644 --- a/WebSocketMain.swf +++ b/WebSocketMain.swf diff --git a/WebSocketMainInsecure.zip b/WebSocketMainInsecure.zip Binary files differindex 2c47546..4b62b13 100644 --- a/WebSocketMainInsecure.zip +++ b/WebSocketMainInsecure.zip diff --git a/flash-src/WebSocket.as b/flash-src/WebSocket.as index 42a8d79..b9be6f7 100644 --- a/flash-src/WebSocket.as +++ b/flash-src/WebSocket.as @@ -61,12 +61,12 @@ public class WebSocket extends EventDispatcher { this.id = id; initNoiseChars(); this.url = url; - var m:Array = url.match(/^(\w+):\/\/([^\/:]+)(:(\d+))?(\/.*)?$/); + var m:Array = url.match(/^(\w+):\/\/([^\/:]+)(:(\d+))?(\/.*)?(\?.*)?$/); if (!m) fatal("SYNTAX_ERR: invalid url: " + url); this.scheme = m[1]; this.host = m[2]; this.port = parseInt(m[4] || "80"); - this.path = m[5] || "/"; + this.path = (m[5] || "/") + (m[6] || ""); this.origin = origin; this.protocol = protocol; this.cookie = cookie; |