Skip to content

Commit

Permalink
Fix repeated pseudo-header field :status (helidon-io#7995)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilac authored Nov 20, 2023
1 parent 91f6828 commit 2cd2873
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2cd2873

Please sign in to comment.