You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Henrique Mendonça (JIRA)" <ji...@apache.org> on 2014/02/12 19:51:22 UTC
[jira] [Updated] (THRIFT-2363) Issue with character encoding of
Success returned from Login using Thrift Proxy and NodeJS
[ https://issues.apache.org/jira/browse/THRIFT-2363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henrique Mendonça updated THRIFT-2363:
--------------------------------------
Fix Version/s: 0.9.2
> Issue with character encoding of Success returned from Login using Thrift Proxy and NodeJS
> ------------------------------------------------------------------------------------------
>
> Key: THRIFT-2363
> URL: https://issues.apache.org/jira/browse/THRIFT-2363
> Project: Thrift
> Issue Type: Bug
> Components: Node.js - Compiler, Node.js - Library
> Affects Versions: 0.9.1
> Environment: CentOS 6.4, NodeJS 0.10.21, NPM thrift module 0.9.1, Accumulo 1.5.0
> Reporter: Ryan Knowles
> Priority: Minor
> Fix For: 0.9.2
>
>
> I recently tried to connect to Accumulo through the Thrift proxy using NodeJS.
> I was able to successfully send login information to Accumulo and receive back a success, but when I tried to use this success to feed into other functions such as listTables I would receive an Exception.
> I traced this down to the AccumuloProxy.js file that was generated from the proxy.thrift file. In the AccumuloProxy_login_result.prototype.read function if the ftype == Thrift.Type.STRING then this.success is set to input.readString(). During this readString function the toString is called on the Buffer, but what is returned has characters that are not correctly encoded. I modified the AccumuloProxy_login_result.prototype.read to call readBinary instead and return the Buffer as success. I was then able to pass the Buffer into the other functions and correctly get a result.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)