Commit 4e519089 authored by jamesge's avatar jamesge

Reset with_auth in controller before each sending

parent 1d6510aa
...@@ -128,6 +128,10 @@ public: ...@@ -128,6 +128,10 @@ public:
_cntl->add_flag(Controller::FLAGS_REQUEST_WITH_AUTH); _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(); } std::string& protocol_param() { return _cntl->protocol_param(); }
const std::string& protocol_param() const { return _cntl->protocol_param(); } const std::string& protocol_param() const { return _cntl->protocol_param(); }
......
...@@ -329,6 +329,8 @@ void PackRedisRequest(butil::IOBuf* buf, ...@@ -329,6 +329,8 @@ void PackRedisRequest(butil::IOBuf* buf,
} }
buf->append(auth_str); buf->append(auth_str);
ControllerPrivateAccessor(cntl).add_with_auth(); ControllerPrivateAccessor(cntl).add_with_auth();
} else {
ControllerPrivateAccessor(cntl).clear_with_auth();
} }
buf->append(request); buf->append(request);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment