997 |
# client identifier (may be overridden) |
# client identifier (may be overridden) |
998 |
user_agent = "xmlrpclib.py/%s (by www.pythonware.com)" % __version__ |
user_agent = "xmlrpclib.py/%s (by www.pythonware.com)" % __version__ |
999 |
|
|
1000 |
|
#def __init__(self): |
1001 |
|
#import xmlrpclib |
1002 |
|
#self.phpsessionid = "" |
1003 |
|
|
1004 |
## |
## |
1005 |
# Send a complete request, and parse the response. |
# Send a complete request, and parse the response. |
1006 |
# |
# |
1019 |
|
|
1020 |
self.send_request(h, handler, request_body) |
self.send_request(h, handler, request_body) |
1021 |
self.send_host(h, host) |
self.send_host(h, host) |
1022 |
self.send_php_sessionid(h, host) |
self.send_php_sessionid(h) |
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 |
|
|
1039 |
except AttributeError: |
except AttributeError: |
1040 |
sock = None |
sock = None |
1041 |
|
|
1042 |
self.phpsessionid = response.getheader('Set-Cookie') |
import __main__ |
1043 |
|
__main__.phpsessionid = response.getheader('Set-Cookie') |
1044 |
#print self.phpsessionid |
#print self.phpsessionid |
1045 |
|
|
1046 |
#return self._parse_response(h.getfile(), sock) |
#return self._parse_response(h.getfile(), sock) |
1092 |
# @param connection Connection handle. |
# @param connection Connection handle. |
1093 |
# @param host Host name. |
# @param host Host name. |
1094 |
|
|
1095 |
def send_php_sessionid(self, connection, host): |
def send_php_sessionid(self, connection): |
1096 |
connection.putheader("PHPSESSID", host) |
import __main__ |
1097 |
|
print "send: " + str(__main__.phpsessionid) |
1098 |
|
connection.putheader("Cookie", str(__main__.phpsessionid)) |
1099 |
#pass |
#pass |
1100 |
|
|
1101 |
|
|