-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed bugs related to protocols and encoding. #154
Conversation
将json消息转化为grpc消息,继而交给grpc handle进行处理,并以json格式返回数据
Optimized the logic of TripleServer and TripleClient, achieving code reuse. Merged encoding and encoding_json
… loading method.(#145)
The RPC client now exclusively uses protobuf for serialization.
@@ -90,7 +90,7 @@ where | |||
Err(status) => return status.to_http(), | |||
}; | |||
|
|||
let req_stream = req.map(|body| Decoding::new(body, decoder, compression, is_json)); | |||
let req_stream = req.map(|body| Decoding::new(body, decoder, compression, true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最后一个字段应该也是动态的吧?
let req = req.into_streaming_request(); | ||
let en = encode( | ||
encoder, | ||
req.into_inner().map(Ok), | ||
self.send_compression_encoding, | ||
is_json, | ||
true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
273和279行这两个值是不是应该一致?
dubbo/src/triple/server/triple.rs
Outdated
let is_json = content_type == "application/json" || content_type == "application/grpc+json"; | ||
|
||
let is_grpc = content_type.to_str().unwrap().contains("grpc"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以对这行代码加对应的注释
No description provided.