Derek Basch wrote:
Can anyone tell me why this CGI code outputs a blank page?
Maybe because it needs a blank line between the header and the body?
self.output = []
self.setContentType("text/plain")
ascii_temp.seek(0)
self.output.extend(ascii_temp.read())
self.output
> but perhaps the webserver sanitizes the output of CGI script and converts
> plain "\n" into "\r\n"
Yes apache does this, since it adds its own headers anyway it will replace
all '\n' in the headers with '\r\n' and '\n\n' with '\r\n\r\n'.
--
damjan
--
http://mail.python.org/mailman/listinfo/
Derek Basch wrote:
> Can anyone tell me why this CGI code outputs a blank page?
>
> self.output = []
> self.setContentType("text/plain")
> ascii_temp.seek(0)
> self.output.extend(ascii_temp.read())
> print ''.join(self.output)
>
> def setContentType(self, type="te
Can anyone tell me why this CGI code outputs a blank page?
self.output = []
self.setContentType("text/plain")
ascii_temp.seek(0)
self.output.extend(ascii_temp.read())
print ''.join(self.output)
def setContentType(self, type="text/xml"):
self.output.extend(["Con