On Wed, 2008-06-11 at 14:36 +0800, James Mao wrote: > On Fri, Jun 6, 2008 at 4:03 PM, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote: > > > On Fri, 2008-06-06 at 13:35 +0800, maomaode wrote: > > > Hi, > > > > > > I've filed the issue https://issues.apache.org/jira/browse/HTTPCORE-162 > > > Testcase patch attached, also paste the stacktrace > > > > > > > > > Some other questions, > > > > > > In the NIO client sample, > > > > > > ioReactor.connect( > > > new InetSocketAddress(url.getHost(), 80), > > > null, > > > new HttpHost(url.getHost()), > > > null); > > > > > > What's the HttpHost used for? we have InetSocketAddress, isn't it enough? > > > > It represents a virtual host. Consider the following: you want to send a > > request to www.google.cn or www.google.ru, but you need to connect to > > the physical host www.google.com > > > > > Oh, I see, I saw the > request.addHeader(HTTP.TARGET_HOST, targethost.toHostString()); > > in the RequestTargetHost.java, > > is it? >
Yep. > > > > > > > > > And another question is, is it possible to use the IP addresss in the > > > InetSocketAddress? > > > > Yes, it is. > > > > I don't know, I 'll create a test case for it, because I remember there's > some problem when I use the IP address instead of the host string last time. > I am not aware of such a problem, but a test case would be very welcome anyway. > > Oleg, Thanks for your help > Any time. Cheers Oleg > James --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
