added support for http redirection
This commit is contained in:
@@ -95,7 +95,9 @@ namespace libtorrent
|
||||
assert(len >= 0);
|
||||
// http://www.ietf.org/rfc/rfc2396.txt
|
||||
// section 2.3
|
||||
static const char unreserved_chars[] = "-_.!~*'()";
|
||||
// some trackers seems to require that ' is escaped
|
||||
// static const char unreserved_chars[] = "-_.!~*'()";
|
||||
static const char unreserved_chars[] = "-_.!~*()";
|
||||
|
||||
std::stringstream ret;
|
||||
ret << std::hex << std::setfill('0');
|
||||
@@ -109,6 +111,10 @@ namespace libtorrent
|
||||
{
|
||||
ret << *str;
|
||||
}
|
||||
else if (*str == ' ')
|
||||
{
|
||||
ret << '+';
|
||||
}
|
||||
else
|
||||
{
|
||||
ret << '%'
|
||||
|
Reference in New Issue
Block a user