[ 
https://issues.apache.org/jira/browse/THRIFT-3925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roman Poliakov updated THRIFT-3925:
-----------------------------------
    Description: 
Node.js implementation of TCompactProtocol instead of returning raw Buffer, 
converts it to string, which leads to data corruption. 

At the line: 
https://github.com/apache/thrift/blob/0.9.3/lib/nodejs/lib/thrift/compact_protocol.js#L764

you can see that it uses "readString" method of the transport instead of using 
"read".


  was:
Node.js implementation of TCompactProtocol instead of returning raw Buffer 
converts it to string which leads to data corruption. 

At the line: 
https://github.com/apache/thrift/blob/0.9.3/lib/nodejs/lib/thrift/compact_protocol.js#L764

you can see that it uses "readString" method of the transport instead of using 
"read".



> Client service recieves string instead of buffer when using TCompactProtocol 
> with node.js library.
> --------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-3925
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3925
>             Project: Thrift
>          Issue Type: Bug
>          Components: Node.js - Library
>    Affects Versions: 0.9.3
>            Reporter: Roman Poliakov
>            Priority: Critical
>         Attachments: 
> Fixed_issue_with_TCompactProtocol_returning_string_instead_of_Buffer_for_service_function_.patch
>
>
> Node.js implementation of TCompactProtocol instead of returning raw Buffer, 
> converts it to string, which leads to data corruption. 
> At the line: 
> https://github.com/apache/thrift/blob/0.9.3/lib/nodejs/lib/thrift/compact_protocol.js#L764
> you can see that it uses "readString" method of the transport instead of 
> using "read".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to