guohao commented on a change in pull request #8497:
URL: https://github.com/apache/dubbo/pull/8497#discussion_r689212149
##########
File path:
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleClientHandler.java
##########
@@ -82,6 +82,8 @@ private void writeRequest(ChannelHandlerContext ctx, final
Request req, final Ch
} else {
stream = AbstractClientStream.stream(url);
}
+ boolean ssl = url.getParameter(CommonConstants.SSL_ENABLED_KEY,false);
+ ctx.channel().attr(TripleConstant.SSL_ATTRIBUTE_KEY).set(ssl);
Review comment:
Set attr only if ssl `enabled`
##########
File path:
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ClientTransportObserver.java
##########
@@ -41,6 +41,12 @@
public ClientTransportObserver(ChannelHandlerContext ctx,
AbstractClientStream stream, ChannelPromise promise) {
this.ctx = ctx;
this.promise = promise;
+ Boolean ssl =
ctx.channel().attr(TripleConstant.SSL_ATTRIBUTE_KEY).get();
+ if (ssl != null && ssl) {
+ SCHEME = AsciiString.of("https");
Review comment:
`of` will create a new AsciiString instance , try reuse a literal
variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]