Skip to content

HTTPS is not possible on Android when using ext.httpclient #973

Open
@x12a1f

Description

@x12a1f

When using the ext.httpclient it is not possible to use https. On Android it seems to be disabled:

I am using org.restlet.ext.httpclient (because I need to use PATCH which is not supported by the standard http client) and register it in my Android application:

Engine.getInstance().getRegisteredClients().clear();
Engine.getInstance().getRegisteredClients().add(new HttpClientHelper(null));

but now I get the following exception:

Internal Connector Error (1002) - The connector encountered an 
unexpected condition which prevented it from fulfilling the request
             at 
org.restlet.resource.ClientResource.doError(ClientResource.java:599)
...
      Caused by: java.lang.IllegalStateException: Scheme 'https' not 
registered.
             at 
org.apache.http.conn.scheme.SchemeRegistry.getScheme(SchemeRegistry.java:80)
             at 
org.apache.http.impl.conn.ProxySelectorRoutePlanner.determineRoute(ProxySelectorRoutePlanner.java:157)
             at 
org.apache.http.impl.client.DefaultRequestDirector.determineRoute(DefaultRequestDirector.java:596)
             at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:293)
             at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
...

It seems https support is disabled on Android:

https://github.com/restlet/restlet-framework-java/blob/master/modules/org.restlet.ext.httpclient/src/org/restlet/ext/httpclient/HttpClientHelper.java#L284

See also

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions