From 8a567f491003d55be4de387760455fb4f5da41a8 Mon Sep 17 00:00:00 2001 From: Ruwei <295415537@qq.com> Date: Mon, 3 Aug 2020 13:54:31 +0800 Subject: [PATCH] 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. --- .../example/http2/helloworld/frame/client/Http2FrameClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/src/main/java/io/netty/example/http2/helloworld/frame/client/Http2FrameClient.java b/example/src/main/java/io/netty/example/http2/helloworld/frame/client/Http2FrameClient.java index 014d4886cb..bbd9c2ccdb 100644 --- a/example/src/main/java/io/netty/example/http2/helloworld/frame/client/Http2FrameClient.java +++ b/example/src/main/java/io/netty/example/http2/helloworld/frame/client/Http2FrameClient.java @@ -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);