You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Pedro Lamarão (Jira)" <ji...@apache.org> on 2020/06/29 20:19:00 UTC

[jira] [Created] (HTTPCORE-635) AbstractBinAsyncEntityProducer.produceData called again after StreamChannel.endStream

Pedro Lamarão created HTTPCORE-635:
--------------------------------------

             Summary: AbstractBinAsyncEntityProducer.produceData called again after StreamChannel.endStream
                 Key: HTTPCORE-635
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-635
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore
    Affects Versions: 5.0.1
            Reporter: Pedro Lamarão
         Attachments: InputStreamServerHandler.java

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.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org