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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 4.4.11
    • 4.4.12, 5.0-beta8
    • HttpCore NIO
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            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

                Slack

                  Issue deployment