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

Class apacheHandler

source code


Main apache entry point for the proxy.

Instance Methods [hide private]
 
__init__(self) source code
 
set_component(self, component) source code
 
headerParserHandler(self, req)
Name-munging if request came from anaconda in response to a kickstart.
source code
 
_transformKickstartRequest(self, req)
If necessary, this routine will transform a "tinified" anaconda- generated kickstart request into a normalized form capable of being cached effectively by squid.
source code
 
_transformKsRequestForBroker(self, req) source code
 
_querySatelliteForChecksum(self, req)
Sends a HEAD request to the satellite for the purpose of obtaining the checksum for the requested resource.
source code
 
handler(self, req)
Main handler to handle all requests pumped through this server.
source code
 
response(self, req, response)
send the response (common code)
source code
 
cleanupHandler(self, req)
Clean up stuff before we close down the session when we are called from apacheServer.Cleanup()
source code

Inherited from spacewalk.common.rhnApache.rhnApache: setlang

Inherited from spacewalk.common.rhnApache.rhnApache (private): _init_request_processor, _set_client_info, _set_lang, _set_proxy_info

Static Methods [hide private]
 
_setSessionToken(headers)
Pushes token into rhnFlags.
source code
 
_transformKsRequestForRedirect(req) source code
 
_generateCacheableKickstartURI(oldURI, checksum)
This routine computes a new cacheable URI based on the old URI and the checksum.
source code
 
_createConnection(host, port, scheme) source code
 
normalize(response)
convert a response to the right type for passing back to rpclib.xmlrpclib.dumps
source code
 
response_file(req, response)
send a file out
source code
 
_response_fault_get(req, response) source code

Inherited from spacewalk.common.rhnApache.rhnApache: getlang, logHandler

Inherited from spacewalk.common.rhnApache.rhnApache (private): _cleanup_request_processor, _set_other

Class Variables [hide private]
  _lang_catalog = 'proxy'
Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: spacewalk.common.rhnApache.rhnApache.__init__

_setSessionToken(headers)
Static Method

source code 

Pushes token into rhnFlags. If doesn't exist, returns None. Pull session token out of the headers and into rhnFlags.

Overrides: spacewalk.common.rhnApache.rhnApache._setSessionToken
(inherited documentation)

headerParserHandler(self, req)

source code 

Name-munging if request came from anaconda in response to a kickstart.

Overrides: spacewalk.common.rhnApache.rhnApache.headerParserHandler

_transformKickstartRequest(self, req)

source code 

If necessary, this routine will transform a "tinified" anaconda- generated kickstart request into a normalized form capable of being cached effectively by squid.

This is done by first making a HEAD request to the satellite for the purpose of updating the kickstart progress and retrieving an MD5 sum for the requested file. We then replace the tinyURL part of the URI with the retrieved MD5 sum. This effectively removes session-specific information while allowing us to still cache based on the uniqueness of the file.

_querySatelliteForChecksum(self, req)

source code 

Sends a HEAD request to the satellite for the purpose of obtaining the checksum for the requested resource. A (status, checksum) tuple is returned. If status is not apache.OK, checksum will be None. If status is OK, and a checksum is not returned, the old BZ 158236 behavior will be used.

_generateCacheableKickstartURI(oldURI, checksum)
Static Method

source code 

This routine computes a new cacheable URI based on the old URI and the
checksum. For example, if the checksum is 1234ABCD and the oldURI was:

    /ty/AljAmCEt/RedHat/base/comps.xml

Then, the new URI will be:

    /ty-cksm/1234ABCD/RedHat/base/comps.xml

If for some reason the new URI could not be generated, return None.

handler(self, req)

source code 

Main handler to handle all requests pumped through this server.

Overrides: spacewalk.common.rhnApache.rhnApache.handler

cleanupHandler(self, req)

source code 

Clean up stuff before we close down the session when we are called from apacheServer.Cleanup()

Overrides: spacewalk.common.rhnApache.rhnApache.cleanupHandler