From 2f9247abfbf932b9b9e406834fa5f23f2fd96168 Mon Sep 17 00:00:00 2001 From: HoneyryderChuck Date: Fri, 4 Aug 2023 14:07:32 +0100 Subject: [PATCH] use default HTTP/2 handshake strategy for grpc --- doc/release_notes/1_0_0.md | 7 ++++++- lib/httpx/plugins/grpc.rb | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/release_notes/1_0_0.md b/doc/release_notes/1_0_0.md index 756900dc..d2ad73c9 100644 --- a/doc/release_notes/1_0_0.md +++ b/doc/release_notes/1_0_0.md @@ -41,4 +41,9 @@ ### dependencies * `:datadog` adapter only supports `ddtrace` gem 1.x or higher. -* `:faraday` adapter only supports `faraday` gem 1.x or higher. \ No newline at end of file +* `:faraday` adapter only supports `faraday` gem 1.x or higher. + +### chore + +* `:grpc` plugin: connection won't buffer requests before HTTP/2 handshake is commpleted, i.e. works the same as plain `httpx` HTTP/2 connection establishment. + * if you are relying on this, you can keep the old behavior this way: `HTTPX.plugin(:grpc, http2_settings: { wait_for_handshake: false })`. diff --git a/lib/httpx/plugins/grpc.rb b/lib/httpx/plugins/grpc.rb index c55da0a2..b35faec0 100644 --- a/lib/httpx/plugins/grpc.rb +++ b/lib/httpx/plugins/grpc.rb @@ -62,7 +62,6 @@ module HTTPX def extra_options(options) options.merge( fallback_protocol: "h2", - http2_settings: { wait_for_handshake: false }, grpc_rpcs: {}.freeze, grpc_compression: false, grpc_deadline: DEADLINE