diff --git a/src/android/com/synconset/CordovaHTTP/CordovaHttpDownload.java b/src/android/com/synconset/CordovaHTTP/CordovaHttpDownload.java index c1d702d..f27c17a 100644 --- a/src/android/com/synconset/CordovaHTTP/CordovaHttpDownload.java +++ b/src/android/com/synconset/CordovaHTTP/CordovaHttpDownload.java @@ -57,6 +57,8 @@ public class CordovaHttpDownload extends CordovaHttp implements Runnable { } catch (HttpRequestException e) { if (e.getCause() instanceof UnknownHostException) { this.respondWithError(0, "The host could not be resolved"); + } else if (e.getCause() instanceof SSLHandshakeException) { + this.respondWithError("SSL handshake failed"); } else { this.respondWithError("There was an error with the request"); } diff --git a/src/android/com/synconset/CordovaHTTP/CordovaHttpGet.java b/src/android/com/synconset/CordovaHTTP/CordovaHttpGet.java index a9f14aa..b6bfe0d 100644 --- a/src/android/com/synconset/CordovaHTTP/CordovaHttpGet.java +++ b/src/android/com/synconset/CordovaHTTP/CordovaHttpGet.java @@ -51,6 +51,8 @@ public class CordovaHttpGet extends CordovaHttp implements Runnable { } catch (HttpRequestException e) { if (e.getCause() instanceof UnknownHostException) { this.respondWithError(0, "The host could not be resolved"); + } else if (e.getCause() instanceof SSLHandshakeException) { + this.respondWithError("SSL handshake failed"); } else { this.respondWithError("There was an error with the request"); } diff --git a/src/android/com/synconset/CordovaHTTP/CordovaHttpPost.java b/src/android/com/synconset/CordovaHTTP/CordovaHttpPost.java index a944954..8a12315 100644 --- a/src/android/com/synconset/CordovaHTTP/CordovaHttpPost.java +++ b/src/android/com/synconset/CordovaHTTP/CordovaHttpPost.java @@ -44,6 +44,8 @@ public class CordovaHttpPost extends CordovaHttp implements Runnable { } catch (HttpRequestException e) { if (e.getCause() instanceof UnknownHostException) { this.respondWithError(0, "The host could not be resolved"); + } else if (e.getCause() instanceof SSLHandshakeException) { + this.respondWithError("SSL handshake failed"); } else { this.respondWithError("There was an error with the request"); } diff --git a/src/android/com/synconset/CordovaHTTP/CordovaHttpUpload.java b/src/android/com/synconset/CordovaHTTP/CordovaHttpUpload.java index a871c79..6250050 100644 --- a/src/android/com/synconset/CordovaHTTP/CordovaHttpUpload.java +++ b/src/android/com/synconset/CordovaHTTP/CordovaHttpUpload.java @@ -83,6 +83,8 @@ public class CordovaHttpUpload extends CordovaHttp implements Runnable { } catch (HttpRequestException e) { if (e.getCause() instanceof UnknownHostException) { this.respondWithError(0, "The host could not be resolved"); + } else if (e.getCause() instanceof SSLHandshakeException) { + this.respondWithError("SSL handshake failed"); } else { this.respondWithError("There was an error with the request"); }