Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3925

Client service recieves string instead of buffer when using TCompactProtocol with node.js library.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 0.9.3
    • 0.10.0
    • Node.js - Library
    • None
    • Patch Available
    • Patch, Important

    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".

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              rayz_razko Roman Poliakov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: