Github user ato commented on a diff in the pull request:
https://github.com/apache/httpcomponents-core/pull/71#discussion_r203645081
--- Diff:
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractHttp2StreamMultiplexer.java
---
@@ -610,7 +612,7 @@ private void processPendingCommands() throws
IOException, HttpException {
connMetrics,
exchangeHandler,
context);
- final Http2Stream stream = new Http2Stream(channel,
streamHandler, false);
+ final Http2Stream stream = new Http2Stream(channel,
streamHandler, pushConsumer, false);
--- End diff --
We must stash the push consumer on some object that's attached to the
original stream so we can later get at it when creating the new promised
stream. I could see at least three ways of doing that:
- on the stream directly (as done here)
- on the stream handler
- adding an 'acceptPromise' method to the exchange handler.
I must had admit I was tempted to modify the exchange handler. But it
didn't fit with your API proposal and I'm not confident enough with the code
base to understand the design consequences.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]