[
https://issues.apache.org/jira/browse/THRIFT-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13866616#comment-13866616
]
Pierre Lamot commented on THRIFT-2205:
--------------------------------------
Hi,
I prepared a patch fixing this yesterday, it also make InputBufferUnderrunError
inherits from Error. I'll send this this evening (gmt+1), Should I open another
issue? should that patch apply upon your patch or upon master?
Also I think, there is an issue in JSONProtocol when serializing strings:
{code}
var ch = str.charAt(i); // a single double quote: "
if (ch === '\\\\"') {
escapedString += '\\\\\\\\\\\\"'; // write out as: \\\\"
...
{code}
actually a single char (ch), can never be equals to 3 chars \\\\" => \\"
Why the triple(quadruple) escaping? I think simple escaping should be find (I
have to check though)
if (ch === '\"') {
escapedString += '\\\"'; // write out as: \"
...
{code}
I will open another issue for this, Some test I wrote for checking JSON message
delimitation fails due to this behavior
Pierre
> Node.js Test Server to support test.js JavaScript Browser test and sundry
> fixes
> -------------------------------------------------------------------------------
>
> Key: THRIFT-2205
> URL: https://issues.apache.org/jira/browse/THRIFT-2205
> Project: Thrift
> Issue Type: Improvement
> Components: JavaScript - Library, Node.js - Library
> Affects Versions: 1.0
> Environment: All
> Reporter: Randy Abernethy
> Assignee: Randy Abernethy
> Priority: Minor
> Labels: node, nodejs
> Attachments: 0002-repairs-Node-JSON-and-Buffer-and-adds-tests.patch
>
>
> Adds lib/nodejs/test/testsvr.js
> This server depends on ThriftTest[.js] and runs clean with test.js in the
> browser.
> Also in this patch:
> Repairs some shortfall in the Node JSON Protocol and transport. Fixes
> overflow on Javascript I64 tests. Improves static_server header output.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)