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


[EMAIL PROTECTED] changed:

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




------- Additional Comments From [EMAIL PROTECTED]  2005-12-22 12:44 -------
GetMethod("/") in your example produces the behavior I would expect.  Thank you
for bringing that to my attention.

So my workaround would be to parse my uri and convert it to a relative uri.  

GetMethod("http://google.com/";) does not work as I expect.  It will ignore the
Host I set.  This is not desirable.  

I wish the request to go to a particular server.  domains can resolve to a
number of different IPs.  

So specifying GetMethod("http://google.com/";) is not inconsistent with also
specifying a specific host to which that request is sent (in my case I'll be
using an IP address).

Is there a particular reason you wish to restrict httpclient so it does not
permit a specific host to override a more general uri domain?

The following example demonstrates the problem (and reproduces the redirect
problem to boot).

            HttpClient httpclient = new HttpClient();
            HostConfiguration hostconf = new HostConfiguration();
            // or whatever IP you wish
            hostconf.setHost("127.0.0.1");
            hostconf.getParams().setVirtualHost("google.com");
            // Should not have to be a relative URL!!!
            GetMethod httpget = new GetMethod("http://google.com/";);
            try {
              httpclient.executeMethod(hostconf, httpget);
              System.out.println(httpget.getResponseBodyAsString());
            } 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to