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 36600] - GetMothod returns to port 80
Date Mon, 12 Sep 2005 05:43:20 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=36600>.
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=36600


jain.samit@gmail.com changed:

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




------- Additional Comments From jain.samit@gmail.com  2005-09-12 07:43 -------
(In reply to comment #4)
> Here are my source files. You should be able to see for yourself that I am using
> a relative path.
> 
> I would like to help in any way that i can to find and repair this bug. Please
> involve me in this. I need to turn this around ASAP.
> 
> Thanks!

Hi,

In CgiProcessor#get(String, String), you are creating an instance of GetMethod
using absolute uri.
        StringBuilder sb=new StringBuilder(Host);
        sb.append("/");
        sb.append(url);
        GetMethod method = new GetMethod(sb.toString());

If you want to use the connection params set in HttpClient, you need to only
provide a relative path URI to GetMethod, like this:
        GetMethod method = new GetMethod(uri);
where uri is a relative path, such as "/", "/path".

The same is true for other get and post methods too.

Samit.


-- 
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