From c268f8f809d606a7603b3677bd211325cd2b8865 Mon Sep 17 00:00:00 2001 From: fangyincheng Date: Sat, 18 Jan 2020 19:07:24 +0800 Subject: [PATCH 1/4] Fix: fix jsonprc about 'HTTP/1.1' --- protocol/jsonrpc/server.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocol/jsonrpc/server.go b/protocol/jsonrpc/server.go index dc85e0f5e7..c280dfa2c3 100644 --- a/protocol/jsonrpc/server.go +++ b/protocol/jsonrpc/server.go @@ -252,6 +252,8 @@ func serveRequest(ctx context.Context, rsp := &http.Response{ Header: make(http.Header), StatusCode: 500, + ProtoMajor: 1, + ProtoMinor: 1, ContentLength: int64(len(body)), Body: ioutil.NopCloser(bytes.NewReader(body)), } @@ -276,6 +278,8 @@ func serveRequest(ctx context.Context, rsp := &http.Response{ Header: make(http.Header), StatusCode: 200, + ProtoMajor: 1, + ProtoMinor: 1, ContentLength: int64(len(body)), Body: ioutil.NopCloser(bytes.NewReader(body)), } From 0b740404e3ee6ab4b05785395935456280eee935 Mon Sep 17 00:00:00 2001 From: fangyincheng Date: Sat, 18 Jan 2020 20:33:16 +0800 Subject: [PATCH 2/4] Fix: omitted param --- protocol/jsonrpc/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/protocol/jsonrpc/server.go b/protocol/jsonrpc/server.go index c280dfa2c3..dc79e4a36b 100644 --- a/protocol/jsonrpc/server.go +++ b/protocol/jsonrpc/server.go @@ -93,6 +93,8 @@ func (s *Server) handlePkg(conn net.Conn) { rsp := &http.Response{ Header: header, StatusCode: 500, + ProtoMajor: 1, + ProtoMinor: 1, ContentLength: int64(len(body)), Body: ioutil.NopCloser(bytes.NewReader(body)), } From 45363f230f55373f7a6f38633c8510816e0e3176 Mon Sep 17 00:00:00 2001 From: fangyincheng Date: Sat, 18 Jan 2020 20:57:08 +0800 Subject: [PATCH 3/4] Mod: README.md --- README.md | 5 +++++ README_CN.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 6e4582f997..8df56ec61c 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,11 @@ Finished List: * JsonRPC V2 * Hessian V2 +- Protocol + * Dubbo + * Jsonrpc2.0 + * [Grpc](https://github.com/apache/dubbo-go/pull/311) + - Registry * ZooKeeper * [etcd v3](https://github.com/apache/dubbo-go/pull/148) diff --git a/README_CN.md b/README_CN.md index a88e35c393..71e87605d6 100644 --- a/README_CN.md +++ b/README_CN.md @@ -41,6 +41,11 @@ Apache License, Version 2.0 - 序列化协议 * JsonRPC V2 * Hessian V2 + +- 协议 + * Dubbo + * Jsonrpc2.0 + * [Grpc](https://github.com/apache/dubbo-go/pull/311) - 注册中心 * ZooKeeper From 7c3178eee8040cde84b76444c46caeb5d9896df8 Mon Sep 17 00:00:00 2001 From: fangyincheng Date: Sat, 18 Jan 2020 21:04:20 +0800 Subject: [PATCH 4/4] modify --- README.md | 2 +- README_CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8df56ec61c..f387b934e2 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Finished List: - Protocol * Dubbo * Jsonrpc2.0 - * [Grpc](https://github.com/apache/dubbo-go/pull/311) + * [gRPC](https://github.com/apache/dubbo-go/pull/311) - Registry * ZooKeeper diff --git a/README_CN.md b/README_CN.md index 71e87605d6..22af253416 100644 --- a/README_CN.md +++ b/README_CN.md @@ -45,7 +45,7 @@ Apache License, Version 2.0 - 协议 * Dubbo * Jsonrpc2.0 - * [Grpc](https://github.com/apache/dubbo-go/pull/311) + * [gRPC](https://github.com/apache/dubbo-go/pull/311) - 注册中心 * ZooKeeper