From 4d96f6f3013f9e8757188905fa73de15e7c36350 Mon Sep 17 00:00:00 2001 From: lilac Date: Tue, 14 Nov 2023 09:16:46 +0800 Subject: [PATCH] Fix repeated pseudo-header field `:status` --- .../java/io/helidon/webserver/grpc/GrpcProtocolHandler.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webserver/grpc/src/main/java/io/helidon/webserver/grpc/GrpcProtocolHandler.java b/webserver/grpc/src/main/java/io/helidon/webserver/grpc/GrpcProtocolHandler.java index cf0e9664d5f..8cc8b28f183 100644 --- a/webserver/grpc/src/main/java/io/helidon/webserver/grpc/GrpcProtocolHandler.java +++ b/webserver/grpc/src/main/java/io/helidon/webserver/grpc/GrpcProtocolHandler.java @@ -201,15 +201,13 @@ public void close(Status status, Metadata trailers) { // todo ignoring trailers WritableHeaders writable = WritableHeaders.create(); - // write the expected gRPC headers for content type and status - writable.set(GRPC_CONTENT_TYPE); writable.set(HeaderValues.create(GrpcStatus.STATUS_NAME, status.getCode().value())); String description = status.getDescription(); if (description != null) { writable.set(HeaderValues.create(GrpcStatus.MESSAGE_NAME, description)); } - Http2Headers http2Headers = Http2Headers.create(writable).status(io.helidon.http.Status.OK_200); + Http2Headers http2Headers = Http2Headers.create(writable); streamWriter.writeHeaders(http2Headers, streamId, Http2Flag.HeaderFlags.create(Http2Flag.END_OF_HEADERS | Http2Flag.END_OF_STREAM),