@@ -128,6 +128,10 @@ public:
_cntl->add_flag(Controller::FLAGS_REQUEST_WITH_AUTH);
}
+ void clear_with_auth() {
+ _cntl->clear_flag(Controller::FLAGS_REQUEST_WITH_AUTH);
+ }
+
std::string& protocol_param() { return _cntl->protocol_param(); }
const std::string& protocol_param() const { return _cntl->protocol_param(); }
@@ -329,6 +329,8 @@ void PackRedisRequest(butil::IOBuf* buf,
buf->append(auth_str);
ControllerPrivateAccessor(cntl).add_with_auth();
+ } else {
+ ControllerPrivateAccessor(cntl).clear_with_auth();
buf->append(request);