Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-573

FileContentDecoder don't always enforce the maximum number of bytes to transfer

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 4.4.11
    • Fix Version/s: 4.4.12, 5.0-beta8
    • Component/s: HttpCore NIO
    • Labels:
      None

      Description

      The FileContentDecoder.transfer function has the 'count' parameter indicating the maximum number of bytes to transfer.
      Implementations (LengthDelimitedDecoder and IdentityDecoder) don't respect this parameter when getting the data from the internal buffer: in practice the whole buffer content is transferred, thus the actual number of bytes transferred may exceed the maximum requested by caller.

      Since the way data are read from the buffer can be limited, it is possible to respect the requested 'count'.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cyrius Julien Coloos
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m