Fix bug in Http2FrameClient (#10427)

Motivation:
This request only has headers frame, it should set endOfStream flag, or
it will never get a response.

Modifications:
Set endOfStream=true in header frame.

Result:
Http2FrameClient can get a response now.
This commit is contained in:
Ruwei 2020-08-03 13:54:31 +08:00 committed by Norman Maurer
parent 300fc243a4
commit f23704736d

View File

@ -104,7 +104,7 @@ public final class Http2FrameClient {
headers.method("GET");
headers.path(PATH);
headers.scheme(SSL? "https" : "http");
final Http2HeadersFrame headersFrame = new DefaultHttp2HeadersFrame(headers);
final Http2HeadersFrame headersFrame = new DefaultHttp2HeadersFrame(headers, true);
streamChannel.writeAndFlush(headersFrame);
System.out.println("Sent HTTP/2 GET request to " + PATH);