mirror of https://github.com/aria2/aria2
2010-02-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
urlencode(removeFragment(...)) in parseUrl(...) * src/Request.ccpull/1/head
parent
e227e53d7b
commit
43cd16b4ff
|
@ -1,3 +1,8 @@
|
||||||
|
2010-02-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
urlencode(removeFragment(...)) in parseUrl(...)
|
||||||
|
* src/Request.cc
|
||||||
|
|
||||||
2010-02-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2010-02-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Wrapped logger->debug(...) with if(logger->debug()) { ... }
|
Wrapped logger->debug(...) with if(logger->debug()) { ... }
|
||||||
|
|
|
@ -109,13 +109,13 @@ static std::string urlencode(const std::string& src)
|
||||||
bool Request::setUrl(const std::string& url) {
|
bool Request::setUrl(const std::string& url) {
|
||||||
_supportsPersistentConnection = true;
|
_supportsPersistentConnection = true;
|
||||||
_url = url;
|
_url = url;
|
||||||
return parseUrl(urlencode(removeFragment(_url)));
|
return parseUrl(_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Request::resetUrl() {
|
bool Request::resetUrl() {
|
||||||
_previousUrl = _referer;
|
_previousUrl = _referer;
|
||||||
_supportsPersistentConnection = true;
|
_supportsPersistentConnection = true;
|
||||||
return parseUrl(urlencode(removeFragment(_url)));
|
return parseUrl(_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Request::setReferer(const std::string& url)
|
void Request::setReferer(const std::string& url)
|
||||||
|
@ -141,10 +141,11 @@ bool Request::redirectUrl(const std::string& url) {
|
||||||
} else {
|
} else {
|
||||||
redirectedUrl = url;
|
redirectedUrl = url;
|
||||||
}
|
}
|
||||||
return parseUrl(urlencode(removeFragment(redirectedUrl)));
|
return parseUrl(redirectedUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Request::parseUrl(const std::string& url) {
|
bool Request::parseUrl(const std::string& srcUrl) {
|
||||||
|
const std::string url = urlencode(removeFragment(srcUrl));
|
||||||
_currentUrl = url;
|
_currentUrl = url;
|
||||||
_host = A2STR::NIL;
|
_host = A2STR::NIL;
|
||||||
_port = 0;
|
_port = 0;
|
||||||
|
|
Loading…
Reference in New Issue