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

[Regression] HttpAsyncRequestExecutor incorrectly handles 204, 205, 304 responses (content body enclosed)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.1
    • 4.2.2
    • None
    • None

    Description

      I've noticed this specifically with 204 status codes (No Content). I've stepped through this and it appears the main cause is that the 'endOfStream' variable inside SimpleInputBuffer doesn't appear to be set to true.

      Here's a stack trace of a thread that is stuck in an infinite loop:
      "I/O dispatcher 7" daemon prio=10 tid=0x08ab8400 nid=0x2dcd runnable [0xf2bd3000]
      java.lang.Thread.State: RUNNABLE
      at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:129)
      at org.apache.http.nio.util.SimpleInputBuffer.read(SimpleInputBuffer.java:100)
      at org.apache.http.nio.entity.ContentInputStream.close(ContentInputStream.java:86)
      at org.apache.http.util.EntityUtils.consume(EntityUtils.java:85)

      Attachments

        1. asyncbug.tar
          28 kB
          Mark Greene

        Activity

          People

            Unassigned Unassigned
            mgreene@hubspot.com Mark Greene
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: