guodongxiaren commented on a change in pull request #1529:
URL: https://github.com/apache/incubator-brpc/pull/1529#discussion_r697072694



##########
File path: src/brpc/channel.cpp
##########
@@ -386,6 +413,12 @@ void Channel::CallMethod(const 
google::protobuf::MethodDescriptor* method,
         CHECK(cntl->protocol_param().empty());
         cntl->protocol_param() = _options.protocol.param();
     }
+    if (_options.protocol == brpc::PROTOCOL_HTTP) {
+        const URI& uri = cntl->http_request().uri();
+        if (uri.host().empty() && !_hostname.empty()) {
+            const_cast<URI&>(uri).set_host(_hostname);

Review comment:
       哦。对。我搞错了,以为拿到的是const的,其实就是mutable的。我改下




-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to