diff --git a/tests/echo.html b/tests/echo.html index f7269e0..cc8b642 100644 --- a/tests/echo.html +++ b/tests/echo.html @@ -140,8 +140,8 @@ window.onload = function() { console.log("onload"); var url = document.location.href; - $D('host').value = (url.match(/host=([^]*)/) || ['',''])[1]; - $D('port').value = (url.match(/port=([^]*)/) || ['',''])[1]; + $D('host').value = (url.match(/host=([^]*)/) || ['',window.location.hostname])[1]; + $D('port').value = (url.match(/port=([^]*)/) || ['',window.location.port])[1]; } diff --git a/tests/echo.py b/tests/echo.py index 31f2fa9..878c31a 100755 --- a/tests/echo.py +++ b/tests/echo.py @@ -45,7 +45,7 @@ class WebSocketEcho(WebSocketServer): if self.client in ins: # Receive client data, decode it, and send it back frames, closed = self.recv_frames() - cqueue.extend(["You said: " + f for f in frames]) + cqueue.extend(frames) if closed: self.send_close() diff --git a/tests/latency.html b/tests/latency.html index 4e1b55c..74538a4 100644 --- a/tests/latency.html +++ b/tests/latency.html @@ -281,8 +281,8 @@ message("initializing web-socket-js flash bridge"); } var url = document.location.href; - $D('host').value = (url.match(/host=([^]*)/) || ['',''])[1]; - $D('port').value = (url.match(/port=([^]*)/) || ['',''])[1]; + $D('host').value = (url.match(/host=([^]*)/) || ['',window.location.hostname])[1]; + $D('port').value = (url.match(/port=([^]*)/) || ['',window.location.port])[1]; $D('payload_size').value = payload_size; } diff --git a/tests/plain_echo.html b/tests/plain_echo.html new file mode 100644 index 0000000..12926fb --- /dev/null +++ b/tests/plain_echo.html @@ -0,0 +1,168 @@ + + +
+