chaoyoung commented on issue #9342:
URL: https://github.com/apache/dubbo/issues/9342#issuecomment-6758038756

   Independently reproduced the Chinese status-message corruption with official 
Dubbo 3.3.6 and 3.3.7 artifacts (OpenJDK 25, Netty 4.2.19.Final), without a 
custom transport SPI.
   
   The current framework fallback in 
CompositeExceptionHandler.resolveGrpcStatus writes the raw exception message 
into grpc-message. Passing that trailer through Netty's actual HPACK 
encoder/decoder changes "业务校验失败" to "??????" and "错误的token" to "???token"; 
ASCII text survives. A message containing a literal percent sign can also make 
the existing client percent-decoder throw.
   
   The gRPC specification requires UTF-8 followed by percent-encoding for 
grpc-message: 
https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#responses . The 
existing TriRpcStatus.encodeMessage helper preserves all these cases when used 
before HPACK.
   
   The historical #9375 merged into 3.0 does not cover this current fallback. 
On 3.3 at 1cf125c421691ab2b3f1b82f0125be03eff338c9, new upstream regression 
tests initially produced 9 invocations: 7 assertion failures, 1 decoding error, 
and 1 passing ASCII control. A focused sender-side fix now passes 11 new 
invocations plus 22 adjacent status tests. Tests cover Chinese, emoji, 
percent/plus, percent-looking literal text, newline, verbose mode, null 
messages, and leaving extension-owned encoded trailers unchanged.
   
   A separate component-level interop check against grpc-java 1.77.0's 
status-message marshaller passed six message cases after HPACK. This is not a 
full socket RPC, application deployment, or production-load test. Malformed 
inbound percent-decoding tolerance is separate follow-up scope; this patch only 
encodes framework-generated outbound messages.
   
   I will submit the focused fix against this existing issue rather than open a 
duplicate. Investigation, tests and proposed fix were AI-assisted.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to