From 17c905e37bef5a1c9248b83a757830dc0ddd1034 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 7 Mar 2007 00:21:36 +0000 Subject: [PATCH] fixed issue with single file web seeds with pre-urlencoded paths. Now, the url in the torrent file is assumed to be url-encoded. --- src/web_peer_connection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/web_peer_connection.cpp b/src/web_peer_connection.cpp index 1789960a5..2f6794cd5 100755 --- a/src/web_peer_connection.cpp +++ b/src/web_peer_connection.cpp @@ -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;