summaryrefslogtreecommitdiff
path: root/src/Request.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-05-14 13:25:42 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-05-14 13:25:42 +0000
commit30a378aa57caf55047542f484a0c01982e77f7fd (patch)
treeb931732f2f9b3205140f7a25b34d85e52290dd00 /src/Request.cc
parent309ad8c5efaa88295808887a6414c3baf73f520f (diff)
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added COLON_C(".") and used it in Request::parseUrl() * src/A2STR.cc * src/A2STR.h * src/Request.cc (parseUrl)
Diffstat (limited to 'src/Request.cc')
-rw-r--r--src/Request.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Request.cc b/src/Request.cc
index 5e95708a..17dee95c 100644
--- a/src/Request.cc
+++ b/src/Request.cc
@@ -125,7 +125,8 @@ bool Request::parseUrl(const std::string& url) {
std::string::size_type atmarkp = hostPart.find_last_of("@");
if(atmarkp != std::string::npos) {
std::string authPart = hostPart.substr(0, atmarkp);
- std::pair<std::string, std::string> userPass = Util::split(authPart, ":");
+ std::pair<std::string, std::string> userPass =
+ Util::split(authPart, A2STR::COLON_C);
_username = Util::urldecode(userPass.first);
_password = Util::urldecode(userPass.second);
hostPart.erase(0, atmarkp+1);
@@ -146,7 +147,7 @@ bool Request::parseUrl(const std::string& url) {
// find directory and file part
std::string::size_type direp = tempUrl.find_last_of("/");
if(direp == std::string::npos || direp <= hep) {
- dir = "/";
+ dir = A2STR::SLASH_C;
direp = hep;
} else {
std::string rawDir = tempUrl.substr(hep, direp-hep);