[
https://issues.apache.org/jira/browse/THRIFT-2205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867186#comment-13867186
]
Pierre Lamot commented on THRIFT-2205:
--------------------------------------
Hi randy,
As I understand it, the length node's buffer is allocated as the user request
it. If the user ask for 1234 bytes, buffer.length will return 1234 and not
2048 [(1)|http://nodejs.org/api/buffer.html#buffer_buf_length]
So in our case, the buffer length is our message length (we don't over allocate
it)
Otherwise we have to store the framesize.
I did ran the tests with TJSONProtocol/TFramedTransport with no particular
issue.
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: 0001-node-test-update-with-JSON-Buf-fixes.patch,
> 0002-node-client-server-test-update.patch,
> 0003-node-throwed-error-should-be-instanciated.patch,
> 0004-node-fix-TJSONProtocol-parser.patch,
> 0005-node-tests-for-json-frame-and-bin-buf.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)