From 4167de31e4c8a81602860a18194badb211efeada Mon Sep 17 00:00:00 2001
From: Michael Grosse <grosse@cosmocode.de>
Date: Mon, 11 Apr 2016 11:55:50 +0200
Subject: [PATCH] use SSL if scheme is https

This is to ensure that we use SSL/TLS if a custom port is defined an no
proxy is used.

Fixes #1526
---
 inc/HTTPClient.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 4aefcfe5a..e87ce741a 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -278,7 +278,7 @@ class HTTPClient {
         }
 
         // add SSL stream prefix if needed - needs SSL support in PHP
-        if($port == 443 || $this->proxy_ssl) {
+        if($port == 443 || $this->proxy_ssl || $uri['scheme'] == 'https') {
             if(!in_array('ssl', stream_get_transports())) {
                 $this->status = -200;
                 $this->error = 'This PHP version does not support SSL - cannot connect to server';
-- 
GitLab