983 |
def __getattr__(self, name): |
def __getattr__(self, name): |
984 |
return _Method(self.__send, "%s.%s" % (self.__name, name)) |
return _Method(self.__send, "%s.%s" % (self.__name, name)) |
985 |
def __call__(self, *args): |
def __call__(self, *args): |
986 |
return self.__send(self.__name, args) |
return self.__send(self.__name, *args) |
987 |
|
|
988 |
## |
## |
989 |
# Standard transport class for XML-RPC over HTTP. |
# Standard transport class for XML-RPC over HTTP. |
1023 |
self.send_user_agent(h) |
self.send_user_agent(h) |
1024 |
self.send_content(h, request_body) |
self.send_content(h, request_body) |
1025 |
|
|
|
#errcode, errmsg, headers = h.getreply() |
|
1026 |
response = h.getresponse() |
response = h.getresponse() |
1027 |
|
|
1028 |
if response.status != 200: |
if response.status != 200: |
1040 |
|
|
1041 |
import __main__ |
import __main__ |
1042 |
__main__.phpsessionid = response.getheader('Set-Cookie') |
__main__.phpsessionid = response.getheader('Set-Cookie') |
|
#print self.phpsessionid |
|
1043 |
|
|
1044 |
#return self._parse_response(h.getfile(), sock) |
#return self._parse_response(h.getfile(), sock) |
1045 |
return self._parse_response(response, None) |
return self._parse_response(response, None) |
1062 |
def make_connection(self, host): |
def make_connection(self, host): |
1063 |
# create a HTTP connection object from a host descriptor |
# create a HTTP connection object from a host descriptor |
1064 |
import httplib |
import httplib |
|
#return httplib.HTTP(host) |
|
1065 |
return httplib.HTTPConnection(host) |
return httplib.HTTPConnection(host) |
1066 |
|
|
1067 |
## |
## |
1091 |
|
|
1092 |
def send_php_sessionid(self, connection): |
def send_php_sessionid(self, connection): |
1093 |
import __main__ |
import __main__ |
|
print "send: " + str(__main__.phpsessionid) |
|
1094 |
connection.putheader("Cookie", str(__main__.phpsessionid)) |
connection.putheader("Cookie", str(__main__.phpsessionid)) |
|
#pass |
|
1095 |
|
|
1096 |
|
|
1097 |
## |
## |