Closed sashakh closed 6 years ago
Hi,
Thanks for the detailed bug info, and I have managed to re-produce it.
I think the bug is that wampcc should not send the value '3' to the server, in the first instance. Re-reading the specs, that is not a supported value. So a fix would be in rawsocket_protocol::initiate(t_initiate_cb cb)
, to check that the user has selected a specific serialiser; if they haven't, an exception should be thrown.
However, I think the WAMP specification is a little inconsistent here. If using a websocket, the client can say, during login, that it support both Json & MessagePack serialisations, and the server gets to choose. But this feature is apparently not supported for RawSocket (according to docs).
So, short term fix, is to reject the request in the above function. But possibly I will check with the WAMP protocol maintainers to confirm my understanding.
Thanks, Darren, Looks like a good plan. Sasha
On Dec 14, 2017 00:05, "Darren Smith" notifications@github.com wrote:
Hi,
Thanks for the detailed bug info, and I have managed to re-produce it.
I think the bug is that wampcc should not send the value '3' to the server, in the first instance. Re-reading the specs, that is not a supported value. So a fix would be in rawsocket_protocol::initiate(t_initiate_cb cb), to check that the user has selected a specific serialiser; if they haven't, an exception should be thrown.
However, I think the WAMP specification is a little inconsistent here. If using a websocket, the client can say, during login, that it support both Json & MessagePack serialisations, and the server gets to choose. But this feature is apparently not supported for RawSocket (according to docs).
So, short term fix, is to reject the request in the above function. But possibly I will check with the WAMP protocol maintainers to confirm my understanding.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darrenjs/wampcc/issues/18#issuecomment-351540150, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCIjMgxfjjb0NAkrEfrakyC9yIexs8wks5tAEoSgaJpZM4RBAqc .
Fixed on c09a2b4ff0fe025853fba44d6b29dc44ffdaf059
Hi, I'm running wampcc against crossbar.io router using raw socket protocol and it fails in such way:
crossbar.io log says:
Tracking down onto the code I see that failure happens on wampcc side: https://github.com/darrenjs/wampcc/blob/master/libs/wampcc/rawsocket_protocol.cc#L167-L170 , where serializer = 3 (as requested by wampcc and echoed by crossbar.io), but only known values for wampcc are 1 and 2 (json and msgpack), so it fails. Then I've requested serializer explicitly:
and it worked fine.
My question is how things should be negotiated between wampcc and crossbar.io and where the fix is needed? Thanks!