Don't Want Visitor To See Nuttin'

Victor Subervi victorsubervi at gmail.com
Thu Mar 10 18:48:37 EST 2011


On Wed, Mar 9, 2011 at 5:33 PM, Ian <hobson42 at gmail.com> wrote:

> On 09/03/2011 21:01, Victor Subervi wrote:
>
>> The problem is that it prints "Content-Type: text/html" to the screen
>>
> If you can see what is intended to be a header, then it follows that you
> are not sending the header correctly.
>
> Sorry - can't tell you how to send a header. You don't say what framework
> you are using.
>

Framework? Python on CentOS, if that's what you're asking. From what I know
of python, one always begins a web page with something like this:

  print "Content-Type: text/html"
  print
  print '''
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>

and this has worked in the past, so I'm surprised it doesn't work here.
Don't understand what I've done wrong, nor why it prints the first line to
screen.
TIA,
Beno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110310/45adc6bb/attachment.html>


More information about the Python-list mailing list