Skip to content

Commit

Permalink
update http2/http2.go
Browse files Browse the repository at this point in the history
  • Loading branch information
vearne committed Sep 10, 2024
1 parent 1218b79 commit 0894950
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and use it for grayscale testing, stress testing or traffic analysis.

## Feature
* support filter
* support to parse Protobuf, requires grpc reflection [GRPC Server Reflection Protocol](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md#grpc-server-reflection-protocol)
* support to parse Protobuf, **requires grpc reflection** [GRPC Server Reflection Protocol](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md#grpc-server-reflection-protocol)
* Supports various input and output plugins
* Supports multiple encoding forms of gRPC requests (can be easily extended)
* Support gRPC request replay and replay at multiple speeds
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GrpcReplay 是一个网络监控工具,可以记录您的 grpc流量(Unary RPC

## 特性
* 支持过滤器
* 可以解析Protobuf,需要grpc反射,参考[GRPC Server Reflection Protocol](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md#grpc-server-reflection-protocol)
* 可以解析Protobuf,**需要grpc反射**,参考[GRPC Server Reflection Protocol](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md#grpc-server-reflection-protocol)
* 支持多种input和output
* 支持多种gRPC请求的编码形式(可以方便的扩展)
* 支持gRPC请求重放,支持以多倍速重放
Expand Down
1 change: 1 addition & 0 deletions http2/http2.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ func (s *Stream) toMsg(finder *PBMessageFinder) (*protocol.Message, error) {

codecType := getCodecType(s.Headers)
if codecType == CodecProtobuf {
s.Method = strings.TrimSpace(s.Method)
if len(s.Method) <= 0 {
slog.Error("method is empty, this is illegal")
} else if !strings.Contains(s.Method, "grpc.reflection") {
Expand Down

0 comments on commit 0894950

Please sign in to comment.