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 GitHub
parent 11107a4121
commit 8a567f4910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,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);