fixed bug in url encoder and in client test

This commit is contained in:
Arvid Norberg
2010-03-29 00:31:30 +00:00
parent e22c6cdf62
commit 9977480f02
4 changed files with 14 additions and 7 deletions

View File

@@ -212,10 +212,10 @@ namespace libtorrent
// % should be ok
"%+"
// reserved
";?:@=&/"
";?:@=&,$/"
// unreserved (special characters) ' excluded,
// since some buggy trackers fail with those
"$-_.!~*(),"
"-_!.~*()"
// unreserved (alphanumerics)
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
"0123456789";
@@ -250,12 +250,12 @@ namespace libtorrent
std::string escape_string(const char* str, int len)
{
return escape_string_impl(str, len, 9);
return escape_string_impl(str, len, 11);
}
std::string escape_path(const char* str, int len)
{
return escape_string_impl(str, len, 8);
return escape_string_impl(str, len, 10);
}
bool need_encoding(char const* str, int len)