--- nfo/projects/netfraggle/libs/xmlrpclib.py 2004/08/30 13:12:18 1.1 +++ nfo/projects/netfraggle/libs/xmlrpclib.py 2004/08/30 13:57:22 1.2 @@ -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.2 2004/08/30 13:57:22 joko Exp $ # # an XML-RPC client interface for Python. # @@ -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,7 +1019,7 @@ 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) @@ -1035,7 +1039,8 @@ except AttributeError: sock = None - self.phpsessionid = response.getheader('Set-Cookie') + import __main__ + __main__.phpsessionid = response.getheader('Set-Cookie') #print self.phpsessionid #return self._parse_response(h.getfile(), sock) @@ -1087,8 +1092,10 @@ # @param connection Connection handle. # @param host Host name. - def send_php_sessionid(self, connection, host): - connection.putheader("PHPSESSID", host) + def send_php_sessionid(self, connection): + import __main__ + print "send: " + str(__main__.phpsessionid) + connection.putheader("Cookie", str(__main__.phpsessionid)) #pass