my1639963 opened a new issue, #865: URL: https://github.com/apache/rocketmq-clients/issues/865
### Before Creating the Bug Report - [X] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq-clients/discussions). - [X] I have searched the [GitHub Issues](https://github.com/apache/rocketmq-clients/issues) and [GitHub Discussions](https://github.com/apache/rocketmq-clients/discussions) of this repository and believe that this is not a duplicate. - [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ. ### Programming Language of the Client C# ### Runtime Platform Environment OS: Windows11 23H2.22631.4317 Microsoft Visual Studio Community 2022 (64 位) - Current 版本 17.10.3 .net 6 ### RocketMQ Version of the Client/Server Server Version 5.3.1 Client 5.1.0 ### Run or Compiler Version _No response_ ### Describe the Bug 代码片段如下: ``` c# //通过configuration 读取appsettingappsetting.json配置 var endpoint = confiuration["rocketmq:endpoint"]; topic = confiuration["rocketmq:topic"]; var clientConfig = new ClientConfig.Builder() .SetEndpoints(endpoint) .EnableSsl(false) .Build(); _producer = new Producer.Builder() .SetTopics(topic) // 默认主题 .SetClientConfig(clientConfig) .Build() .Result; ``` 调用 new Producer.Builder() 时报错 ``` sh An unhandled exception has occurred while executing the request. System.AggregateException: One or more errors occurred. (Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: Request headers must contain only ASCII characters.", DebugException="System.Net.Http.HttpRequestException: Request headers must contain only ASCII characters. at System.Net.Http.HPack.HPackEncoder.EncodeValueStringPart(String value, Span`1 destination) at System.Net.Http.HPack.HPackEncoder.EncodeStringLiteral(String value, Encoding valueEncoding, Span`1 destination, Int32& bytesWritten) at System.Net.Http.HPack.HPackEncoder.EncodeStringLiterals(ReadOnlySpan`1 values, String separator, Encoding valueEncoding, Span`1 destination, Int32& bytesWritten) at System.Net.Http.HPack.HPackEncoder.EncodeLiteralHeaderFieldWithoutIndexingNewName(String name, ReadOnlySpan`1 values, String separator, Encoding valueEncoding, Span`1 destination, Int32& bytesWritten) at System.Net.Http.Http2Connection.WriteLiteralHeader(String name, ReadOnlySpan`1 values, Encoding valueEncoding, ArrayBuffer& headerBuffer) at System.Net.Http.Http2Connection.WriteHeaderCollection(HttpRequestMessage request, HttpHeaders headers, ArrayBuffer& headerBuffer) at System.Net.Http.Http2Connection.WriteHeaders(HttpRequestMessage request, ArrayBuffer& headerBuffer) at System.Net.Http.Http2Connection.SendHeadersAsync(HttpRequestMessage request, CancellationToken cancellationToken, Boolean mustFlush) at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.<SendAsync>g__SendAsyncWithTelemetry|6_0(HttpMessageHandler handler, HttpRequestMessage request, CancellationToken cancellationToken) at Grpc.Net.Client.Internal.GrpcCall`2.RunCall(HttpRequestMessage request, Nullable`1 timeout)")) ---> Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: Request headers must contain only ASCII characters.", DebugException="System.Net.Http.HttpRequestException: Request headers must contain only ASCII characters. at System.Net.Http.HPack.HPackEncoder.EncodeValueStringPart(String value, Span`1 destination) at System.Net.Http.HPack.HPackEncoder.EncodeStringLiteral(String value, Encoding valueEncoding, Span`1 destination, Int32& bytesWritten) at System.Net.Http.HPack.HPackEncoder.EncodeStringLiterals(ReadOnlySpan`1 values, String separator, Encoding valueEncoding, Span`1 destination, Int32& bytesWritten) at System.Net.Http.HPack.HPackEncoder.EncodeLiteralHeaderFieldWithoutIndexingNewName(String name, ReadOnlySpan`1 values, String separator, Encoding valueEncoding, Span`1 destination, Int32& bytesWritten) at System.Net.Http.Http2Connection.WriteLiteralHeader(String name, ReadOnlySpan`1 values, Encoding valueEncoding, ArrayBuffer& headerBuffer) at System.Net.Http.Http2Connection.WriteHeaderCollection(HttpRequestMessage request, HttpHeaders headers, ArrayBuffer& headerBuffer) at System.Net.Http.Http2Connection.WriteHeaders(HttpRequestMessage request, ArrayBuffer& headerBuffer) at System.Net.Http.Http2Connection.SendHeadersAsync(HttpRequestMessage request, CancellationToken cancellationToken, Boolean mustFlush) at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.<SendAsync>g__SendAsyncWithTelemetry|6_0(HttpMessageHandler handler, HttpRequestMessage request, CancellationToken cancellationToken) at Grpc.Net.Client.Internal.GrpcCall`2.RunCall(HttpRequestMessage request, Nullable`1 timeout)") at Grpc.Net.Client.Internal.GrpcCall`2.GetResponseHeadersCoreAsync() at Org.Apache.Rocketmq.ClientLoggerInterceptor.HandleResponse[TResponse](Task`1 t) at Org.Apache.Rocketmq.RpcClient.QueryRoute(Metadata metadata, QueryRouteRequest request, TimeSpan timeout) at Org.Apache.Rocketmq.ClientManager.QueryRoute(Endpoints endpoints, QueryRouteRequest request, TimeSpan timeout) at Org.Apache.Rocketmq.Client.FetchTopicRoute0(String topic) at Org.Apache.Rocketmq.Client.FetchTopicRoute(String topic) at Org.Apache.Rocketmq.Client.Start() at Org.Apache.Rocketmq.Producer.Start() at Org.Apache.Rocketmq.Producer.Builder.Build() --- End of inner exception stack trace --- ``` ### Steps to Reproduce 中文环境windows,每次调用必然触发 ### What Did You Expect to See? ... ### What Did You See Instead? ... ### Additional Context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org