diff --git a/README.md b/README.md index 6e4582f997..f387b934e2 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..22af253416 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 diff --git a/protocol/jsonrpc/server.go b/protocol/jsonrpc/server.go index dc85e0f5e7..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)), } @@ -252,6 +254,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 +280,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)), }