From 588c21e5428fa4cc34ee95dcecee1719f71a2659 Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Thu, 24 Oct 2019 09:35:28 +0200 Subject: [PATCH] Avoid sending headers as trailers twice (#244) --- CHANGELOG.md | 6 +++++- lib/src/server/handler.dart | 1 + pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3698aae..10072f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.3 + +* Fix a state bug in the server. + ## 2.1.2 * Fix bug introduced in 2.1.1 where the port would be added to the default authority when making a @@ -5,7 +9,7 @@ ## 2.1.1 -* Fix bug introduced in 2.1.0 where an explicit `authority` would not be used when making a secure +* Fix bug introduced in 2.1.0 where an explicit `authority` would not be used when making a secure connection. ## 2.1.0 diff --git a/lib/src/server/handler.dart b/lib/src/server/handler.dart index ea5b05a..065d59e 100644 --- a/lib/src/server/handler.dart +++ b/lib/src/server/handler.dart @@ -283,6 +283,7 @@ class ServerHandler_ extends ServiceCall { _customHeaders..remove(':status')..remove('content-type'); outgoingTrailersMap.addAll(_customHeaders); _customHeaders = null; + _headersSent = true; } _customTrailers..remove(':status')..remove('content-type'); outgoingTrailersMap.addAll(_customTrailers); diff --git a/pubspec.yaml b/pubspec.yaml index 92168a4..3988021 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: grpc description: Dart implementation of gRPC, a high performance, open-source universal RPC framework. -version: 2.1.2 +version: 2.1.3 author: Dart Team homepage: https://github.com/dart-lang/grpc-dart