From 2358f3abc494ed34dba92903013fd52a13b860a1 Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:44:58 -0400 Subject: [PATCH] fix error message about content-types Signed-off-by: Josh Humphries <2035234+jhump@users.noreply.github.com> --- duplex_http_call.go | 2 ++ protocol_connect.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/duplex_http_call.go b/duplex_http_call.go index 78bf13c2..b5937fd1 100644 --- a/duplex_http_call.go +++ b/duplex_http_call.go @@ -168,6 +168,8 @@ func (d *duplexHTTPCall) CloseWrite() error { // response to read from. if d.requestSent.CompareAndSwap(false, true) { go d.makeRequest() + // We never setup a request body, so it's effectively already closed. + // So nothing else to do. return nil } // The user calls CloseWrite to indicate that they're done sending data. It's diff --git a/protocol_connect.go b/protocol_connect.go index 45577d82..6828ab4d 100644 --- a/protocol_connect.go +++ b/protocol_connect.go @@ -1408,7 +1408,7 @@ func connectValidateStreamResponseContentType(requestCodecName string, streamTyp CodeUnknown, "invalid content-type: %q; expecting %q", responseContentType, - connectUnaryContentTypePrefix+requestCodecName, + connectStreamingContentTypePrefix+requestCodecName, ) } responseCodecName := connectCodecFromContentType(