| |
- __builtin__.object
-
- SafeUnpickler
-
- Transport
-
- SafeTransport
- Server
- Server
- exceptions.Exception(exceptions.BaseException)
-
- Error
-
- RequestError
- ResponseError
-
- InvalidContentTypeError
- ProtocolError(ResponseError, xmlrpclib.ProtocolError)
class SafeTransport(Transport) |
|
Handle an HTTPS transaction to a Pickle-RPC server. |
|
- Method resolution order:
- SafeTransport
- Transport
- SafeUnpickler
- __builtin__.object
Methods defined here:
- make_connection(self, host, port=None, key_file=None, cert_file=None)
- Create an HTTPS connection object from a host descriptor.
Methods inherited from Transport:
- parse_response(self, f)
- Read response from input file and parse it.
- parse_response_gzip(self, f)
- Read response from input file, decompress it, and parse it.
- request(self, host, handler, request_body, verbose=False, binary=False, compressed=False, acceptCompressedResponse=False)
- Issue a Pickle-RPC request.
- send_content(self, connection, request_body, binary=False, compressed=False, acceptCompressedResponse=False)
- Send content.
- send_host(self, connection, host)
- Send host header.
- send_request(self, connection, handler, request_body)
- Send request.
- send_user_agent(self, connection)
- Send user-agent header.
Data and other attributes inherited from Transport:
- user_agent = 'PickleRPC/1 (by http://www.webwareforpython.org)'
Methods inherited from SafeUnpickler:
- allowedGlobals(self)
- Allowed class names.
Must return a list of (moduleName, klassName) tuples for all
classes that you want to allow to be unpickled.
Example:
return [('datetime', 'date')]
allows datetime.date instances to be unpickled.
- findGlobal(self, module, klass)
- Find class name.
- load(self, file)
- Unpickle a file.
- loads(self, str)
- Unpickle a string.
Data descriptors inherited from SafeUnpickler:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class SafeUnpickler(__builtin__.object) |
|
Safe unpickler.
For security reasons, we don't want to allow just anyone to unpickle
anything. That can cause arbitrary code to be executed.
So this SafeUnpickler base class is used to control what can be unpickled.
By default it doesn't let you unpickle any class instances at all,
but you can create subclass that overrides allowedGlobals().
Note that the PickleRPCServlet class in WebKit is derived from this class
and uses its load() and loads() methods to do all unpickling. |
|
Methods defined here:
- allowedGlobals(self)
- Allowed class names.
Must return a list of (moduleName, klassName) tuples for all
classes that you want to allow to be unpickled.
Example:
return [('datetime', 'date')]
allows datetime.date instances to be unpickled.
- findGlobal(self, module, klass)
- Find class name.
- load(self, file)
- Unpickle a file.
- loads(self, str)
- Unpickle a string.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Server(__builtin__.object) |
|
uri [,options] -> a logical connection to an XML-RPC server
uri is the connection point on the server, given as
scheme://host/target.
The standard implementation always supports the "http" scheme.
If SSL socket support is available, it also supports "https".
If the target part and the slash preceding it are both omitted,
"/PickleRPC" is assumed.
See the module doc string for more information. |
|
Methods defined here:
- __getattr__(self, name)
- Magic method dispatcher.
Note: to call a remote object with an non-standard name,
use result getattr(server, "strange-python-name")(args)
- __init__(self, uri, transport=None, verbose=False, binary=True, compressRequest=True, acceptCompressedResponse=True)
- Establish a "logical" server connection.
- __repr__(self)
- __str__ = __repr__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
ServerProxy = class Server(__builtin__.object) |
|
uri [,options] -> a logical connection to an XML-RPC server
uri is the connection point on the server, given as
scheme://host/target.
The standard implementation always supports the "http" scheme.
If SSL socket support is available, it also supports "https".
If the target part and the slash preceding it are both omitted,
"/PickleRPC" is assumed.
See the module doc string for more information. |
|
Methods defined here:
- __getattr__(self, name)
- Magic method dispatcher.
Note: to call a remote object with an non-standard name,
use result getattr(server, "strange-python-name")(args)
- __init__(self, uri, transport=None, verbose=False, binary=True, compressRequest=True, acceptCompressedResponse=True)
- Establish a "logical" server connection.
- __repr__(self)
- __str__ = __repr__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Transport(SafeUnpickler) |
|
Handle an HTTP transaction to a Pickle-RPC server. |
|
- Method resolution order:
- Transport
- SafeUnpickler
- __builtin__.object
Methods defined here:
- make_connection(self, host, port=None)
- Create an HTTP connection object from a host descriptor.
- parse_response(self, f)
- Read response from input file and parse it.
- parse_response_gzip(self, f)
- Read response from input file, decompress it, and parse it.
- request(self, host, handler, request_body, verbose=False, binary=False, compressed=False, acceptCompressedResponse=False)
- Issue a Pickle-RPC request.
- send_content(self, connection, request_body, binary=False, compressed=False, acceptCompressedResponse=False)
- Send content.
- send_host(self, connection, host)
- Send host header.
- send_request(self, connection, handler, request_body)
- Send request.
- send_user_agent(self, connection)
- Send user-agent header.
Data and other attributes defined here:
- user_agent = 'PickleRPC/1 (by http://www.webwareforpython.org)'
Methods inherited from SafeUnpickler:
- allowedGlobals(self)
- Allowed class names.
Must return a list of (moduleName, klassName) tuples for all
classes that you want to allow to be unpickled.
Example:
return [('datetime', 'date')]
allows datetime.date instances to be unpickled.
- findGlobal(self, module, klass)
- Find class name.
- load(self, file)
- Unpickle a file.
- loads(self, str)
- Unpickle a string.
Data descriptors inherited from SafeUnpickler:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |