mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-07 04:08:13 +08:00
优化代码
This commit is contained in:
@@ -101,7 +101,7 @@ string FindField(const char* buf, const char* start, const char *end,int bufSize
|
||||
struct StrCaseCompare
|
||||
{
|
||||
bool operator()(const string& __x, const string& __y) const
|
||||
{return toolkit::strcasecmp(__x.data(), __y.data()) < 0 ;}
|
||||
{return strcasecmp(__x.data(), __y.data()) < 0 ;}
|
||||
};
|
||||
typedef map<string,string,StrCaseCompare> StrCaseMap;
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ void RtspSession::onAuthDigest(const weak_ptr<RtspSession> &weakSelf,const strin
|
||||
}
|
||||
|
||||
auto good_response = MD5( encrypted_pwd + ":" + nonce + ":" + MD5(string("DESCRIBE") + ":" + uri).hexdigest()).hexdigest();
|
||||
if(toolkit::strcasecmp(good_response.data(),response.data()) == 0){
|
||||
if(strcasecmp(good_response.data(),response.data()) == 0){
|
||||
//认证成功!md5不区分大小写
|
||||
onAuthSuccess(weakSelf);
|
||||
TraceL << "onAuthSuccess";
|
||||
|
||||
Reference in New Issue
Block a user