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

TFramedTransport does not handle payloads split across packets correctly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.1, 0.9.2
    • Fix Version/s: 0.9.2
    • Component/s: Node.js - Library
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      There are a few bugs in the current TFramedTransport.receiver caused by
      merge mistakes and bad patches. This patch fixes the bugs and simplifies the logic so it is easier to reason about and prevent future issues.

      • THRIFT-2194: Fixed one bug with residual not being set
      • THRIFT-2205: Reverted the above fix (by accident) and broke it further by including InputBufferUnderrunError in TFramedTransport (which is incorrect). This exception is only meant for TBufferedTransport which must use exceptions to signal when more data is needed.

      This patch cleans up TFramedTransport.receiver by only using one hold-over buffer instead of two (previously frame and residual, now just the latter).

      Verified that the current tests still pass.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                roger Roger Meier
                Reporter:
                wadey Wade Simmons
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: