From 9331f6a43d2178b0b718d8b81db81ea10b4d5d3b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 11 Jan 2012 01:03:38 +0900 Subject: Removed static const char[] as much as possible. Provided convenient functions for streq, strieq, startsWith, istartsWith, endsWith, iendsWith to support this move. --- src/HttpServer.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/HttpServer.cc') 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 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); -- cgit