--- nfo/projects/netfraggle/libs/xmlrpclib.py 2004/08/30 13:12:18 1.1 +++ nfo/projects/netfraggle/libs/xmlrpclib.py 2004/08/30 16:54:29 1.3 @@ -1,6 +1,6 @@ # # XML-RPC CLIENT LIBRARY -# $Id: xmlrpclib.py,v 1.1 2004/08/30 13:12:18 joko Exp $ +# $Id: xmlrpclib.py,v 1.3 2004/08/30 16:54:29 joko Exp $ # # an XML-RPC client interface for Python. # @@ -983,7 +983,7 @@ def __getattr__(self, name): return _Method(self.__send, "%s.%s" % (self.__name, name)) def __call__(self, *args): - return self.__send(self.__name, args) + return self.__send(self.__name, *args) ## # Standard transport class for XML-RPC over HTTP. @@ -997,6 +997,10 @@ # client identifier (may be overridden) user_agent = "xmlrpclib.py/%s (by www.pythonware.com)" % __version__ + #def __init__(self): + #import xmlrpclib + #self.phpsessionid = "" + ## # Send a complete request, and parse the response. # @@ -1015,11 +1019,10 @@ self.send_request(h, handler, request_body) self.send_host(h, host) - self.send_php_sessionid(h, host) + self.send_php_sessionid(h) self.send_user_agent(h) self.send_content(h, request_body) - #errcode, errmsg, headers = h.getreply() response = h.getresponse() if response.status != 200: @@ -1035,8 +1038,8 @@ except AttributeError: sock = None - self.phpsessionid = response.getheader('Set-Cookie') - #print self.phpsessionid + import __main__ + __main__.phpsessionid = response.getheader('Set-Cookie') #return self._parse_response(h.getfile(), sock) return self._parse_response(response, None) @@ -1059,7 +1062,6 @@ def make_connection(self, host): # create a HTTP connection object from a host descriptor import httplib - #return httplib.HTTP(host) return httplib.HTTPConnection(host) ## @@ -1087,9 +1089,9 @@ # @param connection Connection handle. # @param host Host name. - def send_php_sessionid(self, connection, host): - connection.putheader("PHPSESSID", host) - #pass + def send_php_sessionid(self, connection): + import __main__ + connection.putheader("Cookie", str(__main__.phpsessionid)) ##