gmosx / dart-wamp

An implementation of the WAMP (http://wamp.ws) protocol for Dart.
BSD 2-Clause "Simplified" License
19 stars 6 forks source link

HTTP 400 error when used with Autobahn (Python) #5

Open gtaylor opened 10 years ago

gtaylor commented 10 years ago

http://autobahn.ws/python/

When I run a Twisted Python Autobahn server and connect with dart-wamp, I get an HTTP 400 error back. I couldn't figure out how to get the body of the error message on the dart-wamp side, but it looked like we may not be setting the "protocol" value on the Websocket to let the server know what is supported.

I think this is where we are getting hung out to dry:

https://github.com/tavendo/AutobahnPython/blob/master/autobahn/autobahn/wamp1/protocol.py#L556

In Autobahn JS (WAMP for JS), here's the protocol setting:

https://github.com/tavendo/AutobahnJS/blob/master/package/lib/websocket.js#L184 https://github.com/tavendo/AutobahnJS/blob/master/package/lib/websocket.js#L15

It looks like it basically works the same way with Dart, as far as passing the protocols to the Websocket constructor.

I think this more or less means that dart-wamp is unusable with a good chunk of the WAMP servers out there, so this may be a show-stopping type of issue.

Sharom commented 10 years ago

@gtaylor It may be related with #7. Please try, if you have free time.