Browse Source

fix hosts.txt loading bug

pull/64/head
user 11 years ago
parent
commit
b0adb6bd92
  1. 2
      AddressBook.cpp
  2. 1
      util.cpp

2
AddressBook.cpp

@ -43,7 +43,7 @@ void AddressBook::LoadHostsFromI2P () @@ -43,7 +43,7 @@ void AddressBook::LoadHostsFromI2P ()
content = i2p::util::http::httpRequest(url_ss.str());
// TODO: check http errors
if (! boost::starts_with(content, "<html>"))
if (! boost::starts_with(content, "<html>") && content.size() > 0)
break;
std::this_thread::sleep_for(std::chrono::seconds(5));
}

1
util.cpp

@ -262,6 +262,7 @@ namespace http @@ -262,6 +262,7 @@ namespace http
// code for parser tests
//{
// i2p::util::http::url u_0("http://127.0.0.1:7070/asdasd?qqqqqqqqqqqq");
// i2p::util::http::url u_1("http://user:password@site.com:8080/asdasd?qqqqqqqqqqqqq");
// i2p::util::http::url u_2("http://user:password@site.com/asdasd?qqqqqqqqqqqqqq");
// i2p::util::http::url u_3("http://user:@site.com/asdasd?qqqqqqqqqqqqq");

Loading…
Cancel
Save