jcelliott / turnpike

Go implementation of a WAMP (Web Application Messaging Protocol) client and router
MIT License
258 stars 88 forks source link

Don't send nil Arguments or ArgumentsKw #72

Open jcelliott opened 9 years ago

jcelliott commented 9 years ago

https://github.com/tavendo/WAMP/blob/master/spec/basic.md#call-1 https://github.com/tavendo/WAMP/blob/master/spec/basic.md#empty-arguments-and-keyword-arguments

Specifically in RESULT messages, but we should check INVOCATION and possibly others.

beatgammit commented 9 years ago

9 would hopefully prevent things like this from happening in the future, but I don't know if the current test framework actually tests WAMP or if it just tests WebSockets.

If such a thing doesn't exist, perhaps we should create one?

jcelliott commented 9 years ago

@beatgammit said:

Fixing this in the serializer is probably the best place to do it, since that prevents null from ever accidentally making it in.

We can also add a simple check in a few places like this