fixed a bug in the http redirection code

This commit is contained in:
Arvid Norberg 2006-04-30 11:03:25 +00:00
parent d63ceac56c
commit ddefc0d348
2 changed files with 8 additions and 8 deletions

View File

@ -121,8 +121,8 @@ namespace libtorrent
, const http_settings& stn
, std::string const& password = "");
virtual tracker_request const& tracker_req() const
{ return m_req; }
// virtual tracker_request const& tracker_req() const
// { return m_req; }
private:
@ -165,7 +165,7 @@ namespace libtorrent
std::string m_server_protocol;
const http_settings& m_settings;
tracker_request m_req;
// tracker_request m_req;
std::string m_password;
int m_code;

View File

@ -684,7 +684,7 @@ namespace libtorrent
close();
return;
}
if (inflate_gzip(m_buffer, m_req, r.get(),
if (inflate_gzip(m_buffer, tracker_request(), r.get(),
m_settings.tracker_maximum_response_length))
{
close();
@ -778,7 +778,7 @@ namespace libtorrent
entry scrape_data = e["files"][ih];
int complete = scrape_data["complete"].integer();
int incomplete = scrape_data["incomplete"].integer();
requester().tracker_response(m_req, peer_list, 0, complete
requester().tracker_response(tracker_request(), peer_list, 0, complete
, incomplete);
return;
}
@ -825,16 +825,16 @@ namespace libtorrent
try { incomplete = e["incomplete"].integer(); }
catch(type_error&) {}
requester().tracker_response(m_req, peer_list, interval, complete
requester().tracker_response(tracker_request(), peer_list, interval, complete
, incomplete);
}
catch(type_error& e)
{
requester().tracker_request_error(m_req, m_code, e.what());
requester().tracker_request_error(tracker_request(), m_code, e.what());
}
catch(std::runtime_error& e)
{
requester().tracker_request_error(m_req, m_code, e.what());
requester().tracker_request_error(tracker_request(), m_code, e.what());
}
}