fixed a bug in the http redirection code
This commit is contained in:
parent
d63ceac56c
commit
ddefc0d348
|
@ -121,8 +121,8 @@ namespace libtorrent
|
||||||
, const http_settings& stn
|
, const http_settings& stn
|
||||||
, std::string const& password = "");
|
, std::string const& password = "");
|
||||||
|
|
||||||
virtual tracker_request const& tracker_req() const
|
// virtual tracker_request const& tracker_req() const
|
||||||
{ return m_req; }
|
// { return m_req; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ namespace libtorrent
|
||||||
std::string m_server_protocol;
|
std::string m_server_protocol;
|
||||||
|
|
||||||
const http_settings& m_settings;
|
const http_settings& m_settings;
|
||||||
tracker_request m_req;
|
// tracker_request m_req;
|
||||||
std::string m_password;
|
std::string m_password;
|
||||||
int m_code;
|
int m_code;
|
||||||
|
|
||||||
|
|
|
@ -684,7 +684,7 @@ namespace libtorrent
|
||||||
close();
|
close();
|
||||||
return;
|
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))
|
m_settings.tracker_maximum_response_length))
|
||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
|
@ -778,7 +778,7 @@ namespace libtorrent
|
||||||
entry scrape_data = e["files"][ih];
|
entry scrape_data = e["files"][ih];
|
||||||
int complete = scrape_data["complete"].integer();
|
int complete = scrape_data["complete"].integer();
|
||||||
int incomplete = scrape_data["incomplete"].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);
|
, incomplete);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -825,16 +825,16 @@ namespace libtorrent
|
||||||
try { incomplete = e["incomplete"].integer(); }
|
try { incomplete = e["incomplete"].integer(); }
|
||||||
catch(type_error&) {}
|
catch(type_error&) {}
|
||||||
|
|
||||||
requester().tracker_response(m_req, peer_list, interval, complete
|
requester().tracker_response(tracker_request(), peer_list, interval, complete
|
||||||
, incomplete);
|
, incomplete);
|
||||||
}
|
}
|
||||||
catch(type_error& e)
|
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)
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue