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

TFramedTransport does not handle payloads split across packets correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.1, 0.9.2
    • 0.9.2
    • Node.js - Library
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: