From 4778fcc12248656a7e3cf9d8986ca9f5f0f5f51a Mon Sep 17 00:00:00 2001 From: akasima Date: Thu, 15 May 2014 11:55:36 +0900 Subject: [PATCH] =?UTF-8?q?#715=20https=20=EC=B2=98=EB=A6=AC=20=ED=95=A0?= =?UTF-8?q?=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= =?UTF-8?q?,=20deprecated=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/httprequest/XEHttpRequest.class.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/classes/httprequest/XEHttpRequest.class.php b/classes/httprequest/XEHttpRequest.class.php index 538956561..901d4fcea 100644 --- a/classes/httprequest/XEHttpRequest.class.php +++ b/classes/httprequest/XEHttpRequest.class.php @@ -8,6 +8,7 @@ * @author NAVER (developers@xpressengine.com) * @package /classes/httprequest * @version 0.1 + * @deprecated */ class XEHttpRequest { @@ -24,6 +25,12 @@ class XEHttpRequest */ var $m_port; + /** + * target scheme + * @var string + */ + var $m_scheme; + /** * target header * @var array @@ -34,10 +41,11 @@ class XEHttpRequest * constructor * @return void */ - function XEHttpRequest($host, $port) + function XEHttpRequest($host, $port, $scheme='') { $this->m_host = $host; $this->m_port = $port; + $this->m_scheme = $scheme; $this->m_headers = array(); } @@ -108,7 +116,13 @@ class XEHttpRequest { static $crlf = "\r\n"; - $sock = @fsockopen($this->m_host, $this->m_port, $errno, $errstr, $timeout); + $scheme = ''; + if($this->m_scheme=='https') + { + $scheme = 'ssl://'; + } + + $sock = @fsockopen($scheme . $this->m_host, $this->m_port, $errno, $errstr, $timeout); if(!$sock) { return new Object(-1, 'socket_connect_failed');