[
https://issues.apache.org/jira/browse/THRIFT-4987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17062379#comment-17062379
]
Mario Emmenlauer commented on THRIFT-4987:
------------------------------------------
No I did not, but there may be two alternatives:
* If you want the binary protocol for speed and network efficiency, then you
may consider using the NodeJS websocket implementation (can also be used in the
browser via webpack or browserify). The throughput over websockets is even
better, in the browser quite a bit!
* I've also found that comparing the implementations of protocols between the
different languages helps quite a bit. We could unify the binary protocol
between NodeJS and plain JS a bit in the recent past, and this helps to
identify small differences that point to bugs. So if you want to stick with
XHR, maybe just compare the implementation to another one and look for obvious
differences?
> TProtocolException: Bad version in readMessageBegin when using XHR client
> with C++ server
> -----------------------------------------------------------------------------------------
>
> Key: THRIFT-4987
> URL: https://issues.apache.org/jira/browse/THRIFT-4987
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Library
> Affects Versions: 0.13.0
> Reporter: Mario Emmenlauer
> Priority: Major
>
> I'm getting a "TProtocolException: Bad version in readMessageBegin" in the
> web browser when running an XHR client with binary protocol on a C++ server.
> The issue comes as soon as I call a method with return value that returns for
> example an int32_t.
> This is tested with latest thrift from master.
> The Nodejs Http client works successfully with binary protocol, so the issue
> seems to be related to the XHR connection or XHR client.
>
> Is this a bug or am I doing something wrong? I've found this report in
> various places on the internet, in combination with Cassandra. It seems this
> happened for Cassandra in the past, but as far as I could see, it was
> resolved by switching to the compact protocol.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)