Subject: Re: [boost] [asio] ip::tcp::iostream usage
From: Carlo Medas (carlomedas_at_[hidden])
Date: 2008-10-05 04:07:26
what changed is not the host but the port, i.e. the tcp port where the
service is listening.
So the host is still the same, as it's a hostname bound to the IP address to
the boost site.
While 8080 is no more "http" service.
If you retry after changing "http" with 8080 (or the service name bound to
8080), it will work.
On Sun, Oct 5, 2008 at 6:54 AM, Gregory Dai <gregory.dai_at_[hidden]> wrote:
> The classic example:
> int main()
> boost::asio::ip::tcp::iostream s("www.boost.org", "http");
> s << "GET / HTTP/1.0\r\n";
> s << "Host: www.boost.org\r\n";
> s << "\r\n" << std::flush;
> std::cout << s.rdbuf();
> return 0;
> It works.
> But with a server on port 8080, it does not seem to work anymore. The host
> line was changed to
> s << "Host: www.boost.org:8080\r\n";
> of course.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk