mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#715 https 처리 할 수 있도록 수정, deprecated 표시
This commit is contained in:
parent
3e12f70956
commit
4778fcc122
1 changed files with 16 additions and 2 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue