summaryrefslogtreecommitdiff
path: root/src/HttpServer.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-01-11 01:03:38 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-01-11 01:03:38 +0900
commit9331f6a43d2178b0b718d8b81db81ea10b4d5d3b (patch)
tree37b92cd0c0b959124c5e7879c7ff1f5ea5730404 /src/HttpServer.cc
parent047d96195c88b056ab643dc2fe2e6fcffd991d44 (diff)
Removed static const char[] as much as possible.
Provided convenient functions for streq, strieq, startsWith, istartsWith, endsWith, iendsWith to support this move.
Diffstat (limited to 'src/HttpServer.cc')
-rw-r--r--src/HttpServer.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc
index 58add493..e797dbff 100644
--- a/src/HttpServer.cc
+++ b/src/HttpServer.cc
@@ -235,9 +235,7 @@ bool HttpServer::authenticate()
}
std::pair<Scip, Scip> p;
util::divide(p, authHeader.begin(), authHeader.end(), ' ');
- static const char A2_AUTHMETHOD[] = "Basic";
- if(!util::streq(p.first.first, p.first.second,
- A2_AUTHMETHOD, vend(A2_AUTHMETHOD)-1)) {
+ if(!util::streq(p.first.first, p.first.second, "Basic")) {
return false;
}
std::string userpass = base64::decode(p.second.first, p.second.second);