• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XML-RPC Server using ssl/https?

#1
[eluser]Unknown[/eluser]
I see several posts regarding this issue. I too have been attempting to get CI XML-RPC to work over ssl but also get the following error:

—-DATA—-
<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
&lt;html&gt;&lt;head>
&lt;title&gt;400 Bad Request&lt;/title&gt;
&lt;/head&gt;&lt;body>
<h1>Bad Request</h1>
Your browser sent a request that this server could not understand.

Reason: You’re speaking plain HTTP to an SSL-enabled server port.

Instead use the HTTPS scheme to access this URL, please.

.....

Has any progress been made on this issue?

Regards,
IFimbres

#2
[eluser]Unknown[/eluser]
ci\system\libraries\Xmlrpc.php need some modifications to work with https/ssl


modify these lines in ci\system\libraries\Xmlrpc.php :
// line 386
$fp = @fsockopen($this->protocol.'://'.$this->server, $this->port,$this->errno, $this->errstr, $this->timeout);

//Line 363
public function __construct($path, $server, $port=80, $protocol='http') {
parent::__construct();
$this->port = $port;
$this->protocol = $protocol;
$this->server = $server;
$this->path = $path;
}

// line 154
function server($url, $port=false){
if (substr($url, 0, 4) != "http") $url = "http://".$url;
$parts = parse_url($url);
if($parts['scheme']=='https'){
$parts['scheme']='ssl';
if($port===false) $port=443;
}
if($port===false) $port=80;
$path = ( ! isset($parts['path'])) ? '/' : $parts['path'];
if (isset($parts['query']) && $parts['query'] != '') {
$path .= '?'.$parts['query'];
}
$this->client = new XML_RPC_Client($path, $parts['host'], $port, $parts['scheme']);
}
// END



Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.