Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

+18 -2
View File
@@ -69,7 +69,7 @@ class _Curl
* @param bool|int $followRedirects Automatically follow redirects? If a number is provided, will follow up to that number of redirects
* @return void
*/
public function __construct( $url, $timeout, $httpVersion, $followRedirects )
public function __construct( $url, $timeout=5, $httpVersion=NULL, $followRedirects=TRUE )
{
/* Init */
$this->url = $url;
@@ -272,6 +272,22 @@ class _Curl
return $response;
}
/**
* Toggle SSL checks
*
* @param boolean $value True will enable SSL checks, false will disable them
* @return \IPS\Http\Request\Socket
*/
public function sslCheck( $value=TRUE )
{
curl_setopt_array( $this->curl, array(
CURLOPT_SSL_VERIFYHOST => ( $value ) ? 2 : FALSE,
CURLOPT_SSL_VERIFYPEER => (boolean) $value
) );
return $this;
}
/**
* Magic Method: __call
* Used for other HTTP methods (like PUT and DELETE)
@@ -331,7 +347,7 @@ class _Curl
}
/* If this is FTP we need to fudge the headers a little */
if( $this->url->data['scheme'] == 'ftp' )
if( isset( $this->url->data['scheme'] ) and $this->url->data['scheme'] == 'ftp' )
{
$output = "HTTP/1.1 200 OK\nFTP: True\r\n\r\n" . $output;
}
+12
View File
@@ -91,6 +91,18 @@ class _Sockets
return $this;
}
/**
* Toggle SSL checks
*
* @param boolean $value True will enable SSL checks, false will disable them
* @return \IPS\Http\Request\Socket
*/
public function sslCheck( $value=TRUE )
{
/* This is here for compatibility with curl */
return $this;
}
/**
* Magic Method: __call
*