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

AbstractBinAsyncEntityProducer.produceData called again after StreamChannel.endStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 5.0.1
    • None
    • HttpCore
    • None

    Description

      We extend AbstractBinAsyncEntityProducer to stream from an InputStream. While investigating a conceptually higher-level problem, we have hit the following situation. In the attached code file, our program raises the assertion at line 66.

      The documentation for produceData asserts "the ability of the underlying byte channel to accept more data" and the documentation for endStream asserts "terminates the underlying data stream". Though not explicitly stated, it seems obvious that, after endStream, the underlying stream cannot accept more data.

      Our original problem is a test case where the server program apparently does not actually send the response entity to the client program. Client logs indicate there is no response body, and debugging revealed that produce eventually calls endStream twice in a row.

       

      Attachments

        1. InputStreamServerHandler.java
          3 kB
          Pedro Lamarão
        2. stack-01.txt
          3 kB
          Pedro Lamarão
        3. stack-03.txt
          3 kB
          Pedro Lamarão
        4. stack-02.txt
          1 kB
          Pedro Lamarão
        5. integrationTest.log
          55 kB
          Pedro Lamarão

        Activity

          People

            Unassigned Unassigned
            pedro.lamarao Pedro Lamarão
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: