fixed issue with single file web seeds with pre-urlencoded paths. Now, the url in the torrent file is assumed to be url-encoded.

This commit is contained in:
Arvid Norberg 2007-03-07 00:21:36 +00:00
parent 0253004ab6
commit 17c905e37b
1 changed files with 3 additions and 2 deletions

View File

@ -175,8 +175,9 @@ namespace libtorrent
if (single_file_request)
{
request += "GET ";
if (using_proxy) request += m_url;
else request += escape_path(m_path.c_str(), m_path.length());
// do not encode single file paths, they are
// assumed to be encoded in the torrent file
request += using_proxy ? m_url : m_path;
request += " HTTP/1.1\r\n";
request += "Host: ";
request += m_host;