diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-10-22 15:09:00 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-10-22 15:09:00 +0000 |
| commit | c6035b2e24410e7a576f83e92257f4bb26d593c9 (patch) | |
| tree | b6221953e8a95566aaeba33c527d70f810f51bed /src/HttpServer.cc | |
| parent | 3349fe081156776aba058b90beebb68d4ee73e75 (diff) | |
2009-10-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved static functions in Util class to namespace util.
* src
* test
Diffstat (limited to 'src/HttpServer.cc')
| -rw-r--r-- | src/HttpServer.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 1ad764c0..ec39253f 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -128,7 +128,7 @@ bool HttpServer::supportsPersistentConnection() const } std::string connection = - Util::toLower(_lastRequestHeader->getFirst(HttpHeader::CONNECTION)); + util::toLower(_lastRequestHeader->getFirst(HttpHeader::CONNECTION)); return connection.find(HttpHeader::CLOSE) == std::string::npos && (_lastRequestHeader->getVersion() == HttpHeader::HTTP_1_1 || @@ -148,14 +148,14 @@ void HttpServer::feedResponse(const std::string& status, std::string header = "HTTP/1.1 "; strappend(header, status, "\r\n", "Content-Type: ", contentType, "\r\n", - "Content-Length: ", Util::uitos(text.size()), "\r\n"); + "Content-Length: ", util::uitos(text.size()), "\r\n"); if(!supportsPersistentConnection()) { header += "Connection: close\r\n"; } if(!headers.empty()) { header += headers; - if(!Util::endsWith(headers, "\r\n")) { + if(!util::endsWith(headers, "\r\n")) { header += "\r\n"; } } @@ -188,12 +188,12 @@ bool HttpServer::authenticate() if(authHeader.empty()) { return false; } - std::pair<std::string, std::string> p = Util::split(authHeader, " "); + std::pair<std::string, std::string> p = util::split(authHeader, " "); if(p.first != "Basic") { return false; } std::string userpass = Base64::decode(p.second); - std::pair<std::string, std::string> userpassPair = Util::split(userpass, ":"); + std::pair<std::string, std::string> userpassPair = util::split(userpass, ":"); return _username == userpassPair.first && _password == userpassPair.second; } |
