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? > > > > > 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. Oleg, Thanks for your help James
