hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38003] - Explicity Set Host Is Being Ignored
Date Thu, 22 Dec 2005 11:10:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38003>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38003


p.issues.apache.org@rimuhosting.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




------- Additional Comments From p.issues.apache.org@rimuhosting.com  2005-12-22 12:10 -------
Hi.  Please try the following code.  It would expect it to use .104 IP address
when connecting to the google server.  It does not.  It will instead use
www.google.com (and use whatever IP is chosen by your dns server).  

HttpClient httpclient = new HttpClient();
HostConfiguration hostconf = new HostConfiguration();
hostconf.setHost("66.249.89.104");
hostconf.getParams().setVirtualHost("www.google.com");
// Must be a relative URL!!!
GetMethod httpget = new GetMethod("/");
try {
  httpclient.executeMethod(hostconf, httpget);
  // do stuff
} finally {
  httpget.releaseConnection();
}



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message