diff --git a/transport/http_util.go b/transport/http_util.go index baec02da..a3c68d4c 100644 --- a/transport/http_util.go +++ b/transport/http_util.go @@ -352,7 +352,7 @@ func decodeGrpcMessageUnchecked(msg string) string { for i := 0; i < lenMsg; i++ { c := msg[i] if c == percentByte && i+2 < lenMsg { - parsed, err := strconv.ParseInt(msg[i+1:i+3], 16, 8) + parsed, err := strconv.ParseUint(msg[i+1:i+3], 16, 8) if err != nil { buf.WriteByte(c) } else { diff --git a/transport/http_util_test.go b/transport/http_util_test.go index 41bf5477..a5f8a85f 100644 --- a/transport/http_util_test.go +++ b/transport/http_util_test.go @@ -135,6 +135,7 @@ func TestDecodeGrpcMessage(t *testing.T) { {"H%61o", "Hao"}, {"H%6", "H%6"}, {"%G0", "%G0"}, + {"%E7%B3%BB%E7%BB%9F", "系统"}, } { actual := decodeGrpcMessage(tt.input) if tt.expected != actual {