You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Oleg Kalnichevski <ol...@apache.org> on 2005/01/17 12:13:00 UTC

Re: Problem with PostMethod.getHostConfiguration().setHost() on v3 beta1

On Mon, Jan 17, 2005 at 01:14:34PM +0300, Riad Souissi wrote:
> 
> 
> 
> Hi,
> 
> Before, using version 2 or version3_alpha2, the following code was
> working:
> 
> ----
> myPostMethod.getHostConfiguration().setHost("somehost", "15555",
> mySslProtocolObject)
> ----
> 
> The reason I was setting mySslProtocolObject on the method level is
> because I do not want to force it on the whole host:port. I need to have
> a granular control.
> 
> Then I switched to version3_beta1, and it stopped to work. It does not
> seem to use any of the SSL classes defined within mySslProtocolObject
> (the object which I derived from ProtocolSocketFactory). I used println
> calls to find out that sslProtocolObject was not used when I was sending
> an HTTPS request to host:port using the myPostMethod defined above.
> 
> Do you have an idea how to get it back to work ? I know that
> getHostConfiguration().setHost() is deprecated, but I found no other way
> to do the same thing with this granularity (at the PostMethod level).
>

Hi Riad,

Try this

HostConfiguration hostconfig = new HostConfiguration("somehost", 15555, 
  MySslProtocolObject);
HttpClient httpclient = new HttpClient();
...

httpclient.executeMethod(hostconfig, httpget);
  
Hope this helps

Oleg

> Regards,
> riad
> 
> DiscalimerThe information in this email and in any files transmitted with it,
> is intended only for the addressee and may contain confidential and/or privileged material.
> Access to this email by anyone else is unauthorized. If you receive this in error,
> please contact the sender immediately and delete the material from any computer.
> If you are not the intended recipient, any disclosure, copying, distribution or
> any action taken or omitted to be taken in reliance on it, is strictly prohibited.
> Statement and opinions expressed in this e-mail are those of the sender, and do not
> necessarily reflect those of STC.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 

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