Skip to content
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

Merged
merged 18 commits into from
Sep 1, 2023
Merged

Fixed bugs related to protocols and encoding. #154

merged 18 commits into from
Sep 1, 2023

Conversation

AdachiAndShimamura
Copy link
Contributor

No description provided.

@@ -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));
Copy link
Member

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

273和279行这两个值是不是应该一致?

let is_json = content_type == "application/json" || content_type == "application/grpc+json";

let is_grpc = content_type.to_str().unwrap().contains("grpc");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以对这行代码加对应的注释

@chickenlj chickenlj merged commit d966a5e into apache:main Sep 1, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants