Thanks for posting this, Martin.

I've been trying to call HTTPS URLs from my ClientResource as you have.  
If I use the HttpClient connector, I still get a 1001 error, but thanks 
for posting the Engine modification.

Incidentally, one of my classes still uses the Client object to make 
outgoing calls that I was going to refactor out.  However, if I set the 
sslContextFactory attribute on the Client's Context object, SSL 
connections work fine using the internal connector.

Not sure what's going on.

Thanks again,
Dustin


On 06/05/11 10:16 AM, Martin Svensson wrote:
> Hi all,
>
> Recently our server stopped working and I think I have found out why. This is 
> what I have observed with the new ssl ext package.
>
> 1. If I want to use the httpclient for HTTPS clients I now need to do
> Engine.getInstance().getRegisteredClients()
>              .add(0, new org.restlet.ext.httpclient.HttpClientHelper(null));
> This because the ssl extension loads the Internal HTTPs client as well.
>
> 2. You need to include the ssl extension if you want to use the httpclient 
> for HTTPS client requests. This is not specified as a dependency in the 
> httpclient extension pom
>
> 3. The Internal HTTPS and httpclient connectors behave differently. The use 
> case I am executing is the following.
> 3.1 Set up a http server on localhost with one resource that opens a client 
> resource and retrieve the contents of that resource and send it forward.
>
> If I use httpclient it works fine for both http/https resources. If I use the 
> internal https client connector it will throw an exception "cannot change 
> mode after SSL traffic has started". I am not sure which connector behaves 
> correctly.
>
> See the attach source code
>
> Thanks,
>
> martin
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2732150

-- 


Dustin N. Jenkins | Tel/Tél: 250.363.3101 | dustin.jenk...@nrc-cnrc.gc.ca

facsimile/télécopieur: (250) 363-0045

National Research Council Canada | 5071 West Saanich Rd, Victoria BC. 
V9E 2E7

Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria 
(C.-B) V9E 2E7

Government of Canada | Gouvernement du Canada

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2732199

Reply via email to