Welcome Guest, Not a member yet? Register   Sign In
HTTPS XML-RPC
#1

[eluser]dazed[/eluser]
Hi,

I am trying to use the XML-RPC class and all was well on my test environment (Non-SSL) but once loaded to the live environment (SSL) I got the following error.

Quote:---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>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href="https://test.site.com/"><b>https://test.site.com/</b></a></blockquote></p>
<hr>
<address>Apache/2.2.16 (Ubuntu) Server at test.site.com Port 443</address>
&lt;/body&gt;&lt;/html>

---END DATA---

Now I have done a bit of research and I have found that some people have said CodeIgniter does not support XML-RPC over ssl/https but have seen some they say they have got it working.

One even says you have to use the httppost method, but I am not sure how to set this up. Can anyone point me in the right direction.

Is this a new feature in version 2?

Thanks
#2

[eluser]dazed[/eluser]
Any one know how to use XML-RPC securely? I have found a number of tuts around REST and SOAP but neither of them are in the base on CodeIgniter? I would of thought that they would of added in this functionality to the new release even if it was not XML-RPC.
#3

[eluser]dazed[/eluser]
OMG, with hours (and I am not kidding) I have finally worked it out.

The way that the documentation has been written you would believe you would need to set up XML-RPC over ssl or https by the command below.

$this->xmlrpc->server('https://192.168.1.1/',443);

I spent ages researching and found nothing, posted here and nothing so started playing around again myself thinking it could not be this hard. I was right. All you need to do is drop the port number. :gulp:


$this->xmlrpc->server('https://192.168.1.1/');

thats all I needed to do, it's so easy when you know how.

Hope my hours of research, head banging against a desk will help some people. Let me know if it does.

Dazed
#4

[eluser]dazed[/eluser]
OK, I take it back.

This is not solved! One of the server admins were playing with the settings and had turned https only off, so even though the address was https the XML gets sent over http. =(

Back to the drawing board.
#5

[eluser]metrofader[/eluser]
Has there been any update for XMLRPC and SSL?
#6

[eluser]Basketcasesoftware[/eluser]
Not that I've heard of. I haven't had any reason (yet) to deal with XML RPC or SSL. But I'm going to see how things progress for you. I appreciate your efforts researching this and keeping us updated on your progress. You are dealing with, what is to me, a more complex coding area that I have taken pains to avoid dealing with. Distributed executables is hairy and hoary stuff.
#7

[eluser]InsiteFX[/eluser]
I looked at the source code and it sends an HTTP 1.0 header. PHP has to be complied with curl

I found this:
Read this may help you

InsiteFX
#8

[eluser]skunkbad[/eluser]
[quote author="InsiteFX" date="1298232112"]I looked at the source code and it sends an HTTP 1.0 header. PHP has to be complied with curl

I found this:
Read this may help you

InsiteFX[/quote]

Just at a glance, it would appear that it would be fairly easy to extend, or rewrite the sendPayload method to use cURL. Didn't get more than a few minutes to look at this, but it's something I'm going to need to do soon.

-- EDIT --
See here: http://codeigniter.com/wiki/MY_Xmlrpc/




Theme © iAndrew 2016 - Forum software by © MyBB