From cfbcacce79f61866ac4308e4217684404f337882 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 9 Jun 2009 16:00:10 +0000 Subject: [PATCH] fixed bug when handling malformed webseed urls and an http proxy --- ChangeLog | 4 ++++ src/web_peer_connection.cpp | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 698c69d7e..ee2932ecc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -50,6 +50,10 @@ * improved support for sparse files on windows * added ability to give seeding torrents preference to active slots +release 0.14.5 + + * fixed bug when handling malformed webseed urls and an http proxy + release 0.14.4 * connect candidate calculation fix diff --git a/src/web_peer_connection.cpp b/src/web_peer_connection.cpp index b0e68d2a5..0f45a92d5 100644 --- a/src/web_peer_connection.cpp +++ b/src/web_peer_connection.cpp @@ -167,9 +167,9 @@ namespace libtorrent // handle incorrect .torrent files which are multi-file // but have web seeds not ending with a slash if (!single_file_request && (m_path.empty() || m_path[m_path.size() - 1] != '/')) - { m_path += "/"; - } + if (!single_file_request && (m_url.empty() || m_url[m_url.size() - 1] != '/')) + m_url += "/"; torrent_info const& info = t->torrent_file();