Replies: 1 comment 2 replies
-
Thanks for proper explanation. It looks like a bug indeed. Can you manage to make a PR to fix perhaps? (and ideally if you can as first commit add a regression test -- it seems we wasn't catching anything regarding binary types) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
as of this PR, CrossWS (at least in NodeJS) automatically sets the binary flag for sending data based on the serialized value (if it is not a string). A normal object gets serialized to a string, so it would be sent as a string, which is what I expected.
However, this changed the behavior (maybe on accident?) by renaming the result of the
toBufferLike
todataBuff
and the parameter of the function todata
(see here), but the typecheck which sets the binary flag still uses thedata
(the parameter, not the result of the toBufferLike).Is this the desired behavior? Because now, everything that isn't a string is sent as a blob (if I understand that correctly)
Beta Was this translation helpful? Give feedback.
All reactions