|
@@ -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);
|