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

Explicitly mention in HttpEntity.getContent() javadoc that closing InputStream will consume content

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 5.1-beta3, 5.1
    • Documentation
    • None

    Description

      Could the documentation of org.apache.http.HttpEntity.getContent() please be improved to explicitly mention that calling close() on the returned InputStream will try to consume the remaining entity content?

      This is mentioned in the tutorial, but the javadoc only contains an "IMPORTANT" section which seems to be addressed to implementers, but not users. Maybe it would also be good to additionally link to the tutorial from the documentation of the method.

      It appears the documentation not being explicit about this might be the reason for HTTPCORE-402 and other issues users are having when close() is blocking for them.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Marcono1234 Marcono1234
            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 - 0.5h
                0.5h