CGIResponse

This is another bundle of attributes designed to deliver a response to the client.

Public variables:

out

The cgi output stream. service = args[1]

Methods

__init__(self, out)

   def __init__(self, out):

getContentType(self)

   def getContentType(self):

Returns the content type string of the output stream. If the headers have not been written, this will be an empty string.

headersWritten(self)

   def headersWritten(self):

writeHeaders(self, contentType, otherHeaders)

   def writeHeaders(self, contentType = 'text/html', otherHeaders = []):

Writes the headers if they have not already been written.

The "Content-type" header is the only one that is always written. If any other headers are desired, they may be added in the otherHeaders list, which should be a list of string headers with their associated values but no line terminators.