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: [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]

Reply via email to