Package proxy :: Module rhnShared :: Class SharedHandler
[hide private]
[frames] | no frames]

Class SharedHandler

source code


Shared handler class (between rhnBroker and rhnRedirect. *** only inherited ***

Instance Methods [hide private]
 
__init__(self, req)
init with http request object
source code
 
_prepHandler(self)
Handler part 0
source code
 
_connectToParent(self)
Handler part 1 Should not return an error code -- simply connects.
source code
 
_create_connection(self)
Returns a Connection object
source code
 
_serverCommo(self)
Handler part 2
source code
 
_handleServerResponse(self, status)
This method can be overridden by subclasses who want to handle server responses in their own way.
source code
 
_get_header(self, k, headerObj=None) source code
 
_clientCommo(self, status=0)
Handler part 3 Forward server's response to the client.
source code
 
_forwardServer2Client(self)
Forward headers, and bodyfd from server to the calling client.
source code
 
_proxy2server(self) source code
 
_getEffectiveURI(self) source code
 
_forwardHTTPHeaders(self, fromResponse, toRequest)
This routine will transfer the header contents of an HTTP response to the output headers of an HTTP request for reply to the original requesting client.
source code
 
_forwardHTTPBody(self, fromResponse, toRequest)
This routine will transfer the body of an HTTP response to the output area of an HTTP request for response to the original requesting client.
source code
Static Methods [hide private]
 
_parse_url(url)
Returns scheme, host, port, path.
source code
 
_getHeaders(req)
Copy the incoming headers.
source code
 
_determineHTTPBodySize(headers)
This routine attempts to determine the size of an HTTP body by searching the headers for a "Content-Length" field.
source code
Method Details [hide private]

_serverCommo(self)

source code 

Handler part 2

Server (or next proxy) communication.

_handleServerResponse(self, status)

source code 

This method can be overridden by subclasses who want to handle server responses in their own way. By default, we will wrap all the headers up and send them back to the client with an error status. This method should return apache.OK if everything went according to plan.

_forwardServer2Client(self)

source code 

Forward headers, and bodyfd from server to the calling client. For most XMLRPC code, this function is called.

_determineHTTPBodySize(headers)
Static Method

source code 

This routine attempts to determine the size of an HTTP body by searching the headers for a "Content-Length" field. The size is returned, if found, otherwise -1 is returned.

_forwardHTTPHeaders(self, fromResponse, toRequest)

source code 

This routine will transfer the header contents of an HTTP response to the output headers of an HTTP request for reply to the original requesting client. This function does NOT call the request's send_http_header routine; that is the responsibility of the caller.

_forwardHTTPBody(self, fromResponse, toRequest)

source code 

This routine will transfer the body of an HTTP response to the output area of an HTTP request for response to the original requesting client. The request's send_http_header function must be called before this function is called.