summaryrefslogtreecommitdiff
path: root/src/HttpServer.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-05 12:01:57 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-05 12:01:57 +0900
commitd1d49036651012433595357ca31e6f65dbec3a6b (patch)
treea962461fc219fa02458d154eef4e3a354bb99e40 /src/HttpServer.cc
parentd305432ec0015cfc9479331531a78f29c398bd8c (diff)
Rewritten bencode2::decode functions
Diffstat (limited to 'src/HttpServer.cc')
-rw-r--r--src/HttpServer.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc
index cef02a80..318635c6 100644
--- a/src/HttpServer.cc
+++ b/src/HttpServer.cc
@@ -227,10 +227,11 @@ bool HttpServer::authenticate()
}
std::string userpass = Base64::decode(std::string(p.second.first,
p.second.second));
- util::divide(p, userpass.begin(), userpass.end(), ':');
- return util::streq(p.first.first, p.first.second,
+ std::pair<Sip, Sip> up;
+ util::divide(up, userpass.begin(), userpass.end(), ':');
+ return util::streq(up.first.first, up.first.second,
username_.begin(), username_.end()) &&
- util::streq(p.second.first, p.second.second,
+ util::streq(up.second.first, up.second.second,
password_.begin(), password_.end());
}