On Fri, 2007-09-07 at 18:53 +0530, nitya vyas wrote:
> another server which does not have any SSL configurations done requires http
> requests. This one is for internal initial testing purpose. So there i have
> to have http requests.. and there even if i ve created httpClient object
> with https theres no problem as all method urls are http and all request
> thus go as http..
>
> So does it mean that I will need to create all method urls with https for
> client server and with http for internal testing server.??
>
Try this:
Protocol stricthttps = new Protocol(
"https",
new StrictSSLProtocolSocketFactory(true),
443);
Protocol.registerProtocol("http", stricthttps);
Oleg
> thanks
>
> On 9/7/07, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
> >
> > On Fri, 2007-09-07 at 11:29 +0530, nitya vyas wrote:
> > > Hi all,
> > > I have in my application one static object of httpClient which i have
> > > created with SSL implementation like below.
> > >
> > > Protocol stricthttps = new Protocol("https", new
> > > StrictSSLProtocolSocketFactory(true),443);
> > >
> > > httpClient = new HttpClient();
> > > httpClient.getHostConfiguration().setHost("hostName", 443, "https");
> > >
> > > Now when i make a request and when create a method object i construct
> > URL
> > > with "http" this makes the request go as http and not as https
> > eventhough
> > > httpClient object is constructed by https. ( httpClient.executeMehod(get
> > or
> > > post method); )
> > >
> > > Does this mean that i will have to make all such urls https and not
> > http??
> > > is there any way so that i can make all requests https globally??
> >
> > If you want HTTPS why are using HTTP in request URIs?
> >
> > Oleg
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]