RFR: 8296410: HttpClient throws java.io.IOException: no statuscode in response for HTTP2

Daniel Fuchs dfuchs at openjdk.org
Mon Jan 23 15:50:11 UTC 2023


On Mon, 23 Jan 2023 14:51:57 GMT, Conor Cleary <ccleary at openjdk.org> wrote:

> Interested to get some other opinions on that analysis or to see if there are any mistakes in that thinking, it was quite a tricky one to wrap my head around given the differences with how Push Requests are treated by the client.

I do disagree with that analysis. We're not speaking of the PUSH_PROMISE frame here, but of the HEADER frame sent on the push promise stream.

When a server wants to send a push promise, it sends a PUSH_PROMISE frame on the request/response stream. This contains the stream id on which the promised push will be sent, as well as the *request headers* of the promised push.
Then *on the push promise stream*, it proceeds to send the response headers of the promised push, followed by the response body (if any - but it would be surprising for a push to have no body), potentially followed by trailers. Note that this is a different stream from the original request-response stream on which the PUSH_PROMISE stream was sent, but like the request/response stream - I believe it can have trailers, though the spec is not clear about this - it only says that it "ends with a frame with the END_STREAM flag set". Like for a regular response we would expect this to be a DATA frame, but if a server has been coded to send the END_STREAM flag on an empty trailer frame, it may also happen there.

-------------

PR: https://git.openjdk.org/jdk/pull/12028


More information about the net-dev mailing list