Re: Strange bug with the XMLRPC Interface



On 3/9/2006, "BAUER Christoph" <cbauer stargazer at> wrote:
>I am using net-misc/drivel 2.0.2 and www-apps/wordpress 2.0.1.
>As I didn't modify wordpress or drivel I tried another tool to find the 
>non-working part. The 'Performancing' PlugIn for Firefox is able to work with 
>wordpress without problems (same host, same account,...)

I just hacked together a quick XML-RPC test app in Python (attached) and
it says the same problem as you got, so there's actually an issue with
the version of Wordpress that you're using, in that it's not spitting
out valid XML in response to XML-RPC requests. Odds are the
Performancing plugin strips leading whitespace, and drivel could do the
same (very untested patch to hack this in also attached), but that's up
to the main developers whether they want to do this or not.

Tom Parker
from xmlrpclib import Transport, Server

class ProxyTransport(Transport):
	"""Handles an HTTP transaction to an XML-RPC server, through an HTTP proxy."""

	def __init__(self, host, port):
		self.proxyHost = host
		self.proxyPort = port

	def request(self, host, handler, request_body, verbose=0):
		return Transport.request(self, host, "http://"+host+handler, request_body, verbose)

	def make_connection(self, host):
		import httplib
		return httplib.HTTP(self.proxyHost, self.proxyPort)
		
#server = Server("http://my.stargazer.at/xmlrpc.php",verbose=True,transport=ProxyTransport("localhost", 8118))
server = Server("http://my.stargazer.at/xmlrpc.php",verbose=True)

try:
    print server.system.listMethods()
except Exception, v:
    print "ERROR", v


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]