
On Sunday 17 August 2008 20:23:02 Dean Michael Berris wrote:
Well, doing 'host bucket.s3.amazonaws.com' from the shell works fine (it recognized that it's a virtualhost) so I don't think I was experiencing network problems then.
It only seems to occur with Boost.Asio's resolver implementation -- somehow it's not processing aliases correctly.
Works fine here: $ ./resolve bucket.s3.amazonaws.com 72.21.202.39 $ cat resolve.cpp #include <iostream> #include <boost/asio/ip/tcp.hpp> using namespace boost::asio; int main(int argc, char* argv[]) { io_service ios; try { ip::tcp::resolver_iterator res = ip::tcp::resolver(ios).resolve(ip::tcp::resolver_query(argv[1], "80")); for(;res != ip::tcp::resolver_iterator(); ++res) { std::cout << res->endpoint().address().to_string() << std::endl; } } catch(std::exception const& ex) { std::cerr << "Error: " << ex.what() << '\n'; } } -- Dizzy "Linux is obsolete" -- AST