153
153
def __writeheaders(self):
154
154
"""Writes out the HTTP and HTML headers before any real data is
156
self.headers_written = True
157
# Prepare the HTTP and HTML headers before the first write is made
158
if self.content_type != None:
159
self.apache_req.content_type = self.content_type
160
self.apache_req.status = self.status
161
if self.location != None:
162
self.apache_req.headers_out['Location'] = self.location
163
if self.write_html_head_foot:
164
# Write the HTML header, pass "self" (request object)
165
self.func_write_html_head(self)
156
self.headers_written = True
157
# Prepare the HTTP and HTML headers before the first write is made
158
if self.content_type != None:
159
self.apache_req.content_type = self.content_type
160
self.apache_req.status = self.status
161
if self.location != None:
162
self.apache_req.headers_out['Location'] = self.location
163
if self.write_html_head_foot:
164
# Write the HTML header, pass "self" (request object)
165
self.func_write_html_head(self)
167
167
def write(self, string, flush=1):
168
168
"""Writes string directly to the client, then flushes the buffer,