rsocket / rsocket-js

JavaScript implementation of RSocket
https://github.com/rsocket/rsocket-js
Apache License 2.0
594 stars 97 forks source link

Fix channel's payload.data deserialization in RSocketMachine #277

Open palamccc opened 5 months ago

palamccc commented 5 months ago

Motivation:

In the current RSocketMachine._handleRequestChannel implementation, the payload is deserialized twice. So it leads to deserialization error when channels are used with serializers in RSocketServer.

This bug only affects 'channel' interaction model, not other interaction models.

Modifications:

The bug and the fix are explained in the code comments. This PR only fixes the 0.x branch.

Result:

Added tests to test the deserialization and serialization path of the channel. Fixes https://github.com/rsocket/rsocket-js/issues/217