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

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 0.9.3
    • Fix Version/s: 0.10.0
    • Component/s: Node.js - Library
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Flags:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: