test query parameters

This commit is contained in:
Tobias Oberstein
2014-06-15 12:58:14 +02:00
parent b9727ee64b
commit e5b79f0bb0
4 changed files with 9 additions and 1 deletions

View File

@@ -21,6 +21,8 @@ __all__ = ("WebSocketResource",
"WSGIRootResource",)
from six.moves.urllib import parse
from zope.interface import implementer
from twisted.protocols.policies import ProtocolWrapper

View File

@@ -0,0 +1,2 @@
test:
PYTHONPATH=../../../../autobahn python server.py

View File

@@ -11,7 +11,7 @@
var wsuri;
if (window.location.protocol === "file:") {
wsuri = "ws://127.0.0.1:8080/ws";
wsuri = "ws://127.0.0.1:8080/ws?a=23&foo=bar";
} else {
wsuri = "ws://" + window.location.hostname + ":8080/ws";
}

View File

@@ -32,10 +32,14 @@ from autobahn.twisted.resource import WebSocketResource, \
class EchoServerProtocol(WebSocketServerProtocol):
def onConnect(self, request):
print("WebSocket connection request: {}".format(request))
def onMessage(self, payload, isBinary):
self.sendMessage(payload, isBinary)
if __name__ == '__main__':
if len(sys.argv) > 1 and sys.argv[1] == 'debug':